-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make log also accept a base. #1667
Conversation
The base shouldn't be 1, and I think you want an error from |
Ah, good catch. I will add error checking for that. Thanks. |
FWIW for testing [http://docs.racket-lang.org/math/flonum.html?q=log#%28def._%28%28lib._math%2Fflonum..rkt%29._fllogb%29%29](fllogb in math/flonum) |
@soegaard Interesting. Although that function only works with flonums, while the Either way, thanks. For the life of me I couldn't find an arbitrary log base function in all of our stdlib. Does anyone else have any thoughts? |
Woops, I mean, the |
@LeifAndersen @mflatt
Perhaps recommend using `fllogb` in case where accuracy is important?
https://github.com/racket/math/blob/master/math-lib/math/private/flonum/flonum-log.rkt#L138
Somehow it feels odd to have "almost" duplicated functionality. Should log
use the same algorithm as fllogb ?
Btw `max-dividing-power` provides similar functionality for bignums.
2017-04-14 3:45 GMT+02:00 Leif Andersen <notifications@github.com>:
… Okay, @mflatt <https://github.com/mflatt> and @soegaard
<https://github.com/soegaard> , I think its ready to merge. The tests are
failing, but that seems to be because they are currently failing in master
as well. Thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1667 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAcLxf8dZnd_RDljukudCzub8W3ngFypks5rvs-3gaJpZM4M8DrV>
.
--
--
Jens Axel Søgaard
|
Good call. I'll update the docs to reflect that tonight.
I don't care one way or another. To me, it makes sense to have Thoughts? One other thing, does anyone have a preference of whether this gets put into 6.9, or should wait until 6.10? I'm okay either way, but if we want 6.9 I should merge this tonight. |
Since it seems like everyone is okay I'm going to go ahead and merge this. |
(log a b) = (/ (log a) (log b)), however it has the potential to run faster.