hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit c1e639c21462f722c445066987da362b0abab7e1
parent 1fb6b4b77253ad1de121bd7b25addec53c87f092
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat,  3 Apr 2021 09:20:41 -0400

strconv::ftos: enable more tests following harec fix

Diffstat:
Mstrconv/ftos.ha | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/strconv/ftos.ha b/strconv/ftos.ha @@ -491,10 +491,8 @@ export fn f64tos(n: f64) const str = { assert(f64tos(0.0 / 0.0) == "NaN"); assert(f64tos(1.0) == "1"); assert(f64tos(0.3) == "0.3"); - // TODO: Fix harec bug: with these zeroes in front, the number is - // truncated to six digits after the decimal point. - //assert(f64tos(0.0031415) == "0.0031415"); - //assert(f64tos(0.0000012345678) == "0.0000012345678"); + assert(f64tos(0.0031415) == "0.0031415"); + assert(f64tos(0.0000012345678) == "0.0000012345678"); assert(f64tos(1.414) == "1.414"); assert(f64tos(1e234f64) == "1e234"); // TODO: Negative exponents for floating point literals not implemented yet!