gleam-lang / gleam-lang/stdlib

`float.to_precision` is imprecise in Javascript

Open
#747 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Gleam
Stars
710
Forks
225
Avg merge
5h 52m
Merged PRs (30d)
3

Description

Code:

```gleam
{ 1_237_698.0 /. 1_000_000.0 }
|> float.to_precision(1)
|> io.debug
```

Output:

```
1.2000000000000002
```

Gleam 1.5.1
stdlib 0.43.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.