fraction icon indicating copy to clipboard operation
fraction copied to clipboard

Is there a list of methods that floats have that aren't impled for fractions

Open DrAlta opened this issue 1 year ago • 2 comments

I know about power and root function mentioned in https://github.com/dnsl48/fraction/issues/60

but are there any others?

I'm working on something, at least for my own personal use until we come up with an official solution. I haven't worked out all the details yet so won't go into them here.

DrAlta avatar Sep 25 '23 08:09 DrAlta

Hey @DrAlta,

Here is the num trait which declares the Float contract: https://docs.rs/num/latest/num/trait.Float.html We don't keep a list, but if you add impl Float for GenericFraction in your local codebase, rustc should give you the list of all missing methods.

dnsl48 avatar Sep 26 '23 21:09 dnsl48

GenericFraction doesn't impl NumCast which is a requirement for Float You have to wrap them in the Float trait so it just lists the mall not only the missing ones.

DrAlta avatar Nov 11 '23 06:11 DrAlta