gleam-lang / gleam-lang/stdlib

Float to string with fixed precision

Open
#541 12 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Gleam
Stars
710
Forks
225
Avg merge
5h 52m
Merged PRs (30d)
3

Description

In Javascript, I am able to do:

```javascript
const value = 0.8999999999
const roundedValueAsString = value.toFixed(2)

console.log(roundedValueAsString) // "0.90"
console.log(typeof roundedValueAsString) // "string"
```

There is similar [behaviour](https://stackoverflow.com/a/55582564) in Elixir

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.