99: Revive Float+Real in no_std thanks to libm r=cuviper a=yoanlcq
Greetings,
This is a hopeful fix for #75.
Basically: Add `libm` as an optional dependency, and handle three possible cases depending on which features are enabled:
- std and libm: std is used;
- std and not libm: std is used;
- libm and not std: libm and FloatCore are used.
It was briefly mentioned that `libm` wasn't ready yet, but this was months ago, and I believe it is better not to wait for too long.
If anything, bugs in `libm` should be fixed in `libm`; `num-traits` is only delegating its implementations to it; not to mention that the more `libm` is used, the likelier issues are to be found and hopefully fixed.
Thanks in advance!
Co-authored-by: Yoan Lecoq <yoanlecoq.io@gmail.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
135: Debug-panic in clamp_min/max if min/max is NAN r=cuviper a=jturner314
This also improves the docs for `clamp`, `clamp_min`, and `clamp_max`.
Closes#134.
Co-authored-by: Jim Turner <git@turner.link>
132: Add comments explaining why transmutes are safe r=cuviper a=Shnatsel
Add comments explaining why transmutes are safe so that people auditing unsafe code don't have to spend time figuring it out by themselves.
Co-authored-by: Sergey "Shnatsel" Davidoff <sdavydov@google.com>
126: Fix num parsing for invalid multi-byte sign chars r=cuviper a=HeroicKatora
Ensure that splitting the potential sign character from the remainder
respects UTF8 boundaries. This lets invalid characters fail correctly
with an error, instead of panicking.
Closes: #125
Co-authored-by: Andreas Molzer <andreas.molzer@gmx.de>
Ensure that splitting the potential sign character from the remainder
respects UTF8 boundaries. This lets invalid characters fail correctly
with an error, instead of panicking.