Skip to content
Commit 2c77f8f4 authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Use sensible maths for `from_rational` (#13660)



* Use sensible maths for from_rational

* Fixes

* Fixes

* More fixes

* Remove debugging

* Add fuzzer tests

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Prevent panics

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* docs

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Clean up old code

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Test all rounding modes of from_rational

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Clean up code

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Revert "Prevent panics"

This reverts commit 7e88ac76138a1b590e68b68318505b69efe1e1f6.

* fix imports

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* cleanup

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Fuzz test multiply_rational

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Fix import

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* Return None in multiply_rational on zero div

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

---------

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
parent 40e1704e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment