Implement and test exp for Ratio#291
Conversation
| /// Implementation of various stdlib exponentiation and logarithm functions | ||
| #[cfg(feature = "std")] | ||
| impl<U, V> Ratio<U, V> |
There was a problem hiding this comment.
Go ahead and merge this impl block with the trig block and update the comments. Same for the tests below. rename mod inv_trig to mod float and include all of the functions.
There was a problem hiding this comment.
Done.
I have also included exp_m1 and ln_1p which weren't in the original list.
log takes a second argument, besides self. I've given it the same type as self but I'm not sure whether we want to be more flexible. So I've added that one in a separate commit.
I've also added [must_use = ...] to the inverse-trig functions which were already there. Also in a separate commit, in case you don't want it. The must_use is there from the beginning for all the new functions that I added.
|
Things look good after a quick skim so I kicked off the test workflows. I'll review in full detail later today. For the |
Close #290.
Please have a look if this is up to standard. If so, I'd be happy to add
exp2,ln,log,log2andlog10in a similar fashion.