PasteRack.org
Paste # 52510
2020-11-14 15:20:41

Fork as a new paste.

Paste viewed 542 times.


Embed:

Testing precision

db.rkt> (define row (query-row my-conn "SELECT 0.1::decimal, 0.2::decimal"))
db.rkt> (for/sum ([i row]) i)
3/10
db.rkt> (real->decimal-string (for/sum ([i row]) i))
"0.30"