Skip to content
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

Missing sqrt #5

Closed
andreasnoack opened this issue Dec 20, 2018 · 5 comments · Fixed by #11
Closed

Missing sqrt #5

andreasnoack opened this issue Dec 20, 2018 · 5 comments · Fixed by #11

Comments

@andreasnoack
Copy link
Member

julia> sqrt(BFloat16(1.0f0))
ERROR: StackOverflowError:
Stacktrace:
 [1] sqrt(::BFloat16) at ./math.jl:518 (repeats 80000 times)
@ViralBShah
Copy link
Member

Do we not have a generic sqrt implementation somewhere? Perhaps @pkofod has one?

@ViralBShah
Copy link
Member

We can also just use @alanedelman 's Babylonian sqrt demo from his AD notebook.

@pkofod
Copy link

pkofod commented Dec 24, 2018

Not too familiar with this number type. From the readme it seems like it’s okay if it calls the Float32 sqrt (insofar that doesn’t calculate stuff in Float64) and convert back to BFloat16? If that’s the case then this is just the issue that’s popped up a few times, that the fun(x::Real)=fun(float(x)) fallbacks can cause infinite recursion when float(x)=x.

@andreasnoack
Copy link
Member Author

It looks like #3 might be useful here. It looks like most of the standard float functions are currently missing.

@ViralBShah
Copy link
Member

I think doing enough to get a cholesky/svd working would be useful without going crazy over the full list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants