google / google/jsonnet

Numbers should manifest with same string representation as other programming environments

Open
#558 19 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

```javascript
$ cat foo.jsonnet
0.9

$ jsonnet foo.jsonnet
0.90000000000000002
```

Not sure if there's a formal standard, but everyone else seems to agree on printing it one particular way, so maybe just follow that:

```bash
$ echo "print 0.9" | python
0.9
$ echo "console.log(0.9)" | node
0.9
$ echo "println(0.9)" | scala
0.9
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.