core: implement Float::to_precision in C without callbacks
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 3 Oct 2017 14:53:59 +0000 (10:53 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 3 Oct 2017 18:45:38 +0000 (14:45 -0400)
commitac5ba4af62bec424be80e1209c84704e37990578
tree20cc248f584a5efcd4a33b8732293e08fa7da4c2
parent1f1aa04c817c9a8f2e31cb2f627f635a1ab4639c
core: implement Float::to_precision in C without callbacks

Fix int overflows in Float::to_precision with a high float value
or a high precision.

The native implementation was removed by 9cb09ccf to support the
interpreter, which, at the time, did not support the FFI. Since then, we
added support for thhe FFI in the interpreter.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/core/text/abstract_text.nit
tests/sav/fibonacci_word.res
tests/sav/montecarlo.res
tests/sav/perlin_noise.res
tests/sav/test_attr_easy.res
tests/sav/test_math.res