-
Notifications
You must be signed in to change notification settings - Fork 28
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
StackOverflowError for pow(::Float32, ::Float64) #47
Comments
That could work, feel free to open a PR. |
torfjelde
added a commit
to torfjelde/DiffRules.jl
that referenced
this issue
Dec 14, 2021
torfjelde
added a commit
to torfjelde/DiffRules.jl
that referenced
this issue
Dec 14, 2021
torfjelde
added a commit
to torfjelde/NaNMath.jl
that referenced
this issue
Dec 14, 2021
Closed by #50 and tagged a new release |
devmotion
added a commit
to JuliaDiff/DiffRules.jl
that referenced
this issue
Jan 28, 2022
* fixed issues with return-type for several rules * initial work on inferring return type using intermediate computations * removed oftype where possible * fixed stupid mistake * missed one in fix of stupid mistake * more fixes * added tests for different types * removed a couple of overdone oftypes * moved a single paranthesis * use irrationals to simplify type-promotion * depend on IrrationalConstants.jl * fixed tests * actually fixed tests * updated rules to use constants from IrrationalConstants * Update src/rules.jl Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * reverted some changes from previous commit * fixed a typo * fixed typo * fixed type-conversion in tests * Apply suggestions from code review Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * reverse previous commit due to JuliaMath/NaNMath.jl#47 * reverse previous commit due to JuliaMath/NaNMath.jl#47 * drop qualifications from rules * reverted unintended change to _abs_deriv * interpolate _abs_deriv * be explicit about imported irrationals * fixed tests * fixed numerical issues in tests by adopting some changes from #79 * relax rtol slightly since we're working with Float32 too here * Update Project.toml * test type of derivative for functions with 2 arguments * fixed types of derivatives for mod, rem and different bessel functions * use deg2rad Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * reverted changes to + and - * remove duplicate rules * add back whitespace * reverted changes to bessel functions * only test return-type having the correct promotion behavior * only test type for 2 argument functions whose derivatives aren't NaN * fixed rules of mod and rem * make each rule its own testset for easier debugging * reverted changes to multiple NaNMath rules * use more explicit promotion in tests Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * check promotion of real instead of specific check for Complex Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * reverted unnecessary change * reverted unnecessary changes * dont check if AbstractFloat in tests Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pow(::Float32, ::Float64)
results in a StackOverflowError due to the use offloat
in the default implementation:https://github.com/mlubin/NaNMath.jl/blob/0fc4df8442fcefebe8efe490781fce5663c03b02/src/NaNMath.jl#L23-L25
Maybe there ought to be a
promote
here?The text was updated successfully, but these errors were encountered: