-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Upgraded math to C99 + bessel functions and replaced wrappers with imports #1440
Conversation
boggle
commented
Jan 5, 2012
- added src/etc/cmathconsts.c for easy generation of per-arch constants when porting
- needs tests but postponed till we have typeclasses
- some renaming (predicates start with 'is_', log functions)
- implemented most cmath macros using /slow/ rust functions to be replaced later
Conflicts: src/libcore/cmath.rs
…stants (for porting)
Conflicts: src/libcore/float.rs
It seems, we have: https://mail.mozilla.org/pipermail/rust-dev/2012-January/001179.html |
Yes but I feel reluctant to implement against them while they are still in a state of flux. Also we first need a bit of a plan how to use them for numeric types and in std and core in general (from_str, to_str stuff). And I'd need const support in typeclasses which really is not there right now. |
Huh. Curious. Are the constants really per-arch? They seem to me like relatively stable mathematical concepts. |
Upgraded math to C99 + bessel functions and replaced wrappers with imports
Well const support in type classes at first is necessary to have f32, f64, float versions of the mathematical constants (pi, e). In order to avoid loss of precision, it may be a good idea to provide these constants as loss free hexadecimal float literals (see #1443). This will ensure that rust's and C's idea of pi, e etc. are identical. Beyond that, libm is pretty generic in what kind of representation of floating point numbers is used by the C compiler (different radix, different size of mantissa, Non-IEEE formats). Thus again, to avoid loss of precision, on such a platform it may be desirable to give the constants in a loss-free form for that platform. |
Slightly reduce CI runtime and reduce log verbosity