Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexknauth/exact-decimal-lang

a racket lang-extension that reads decimals as exact rationals by default
https://github.com/alexknauth/exact-decimal-lang

racket

Last synced: about 1 month ago
JSON representation

a racket lang-extension that reads decimals as exact rationals by default

Awesome Lists containing this project

README

        

exact-decimal-lang
===
a racket lang-extension that reads decimals as exact rationals

documentation: http://pkg-build.racket-lang.org/doc/exact-decimal-lang/index.html

`raco pkg install exact-decimal-lang`

For example, `#lang exact-decimal racket/base` is a language like `racket/base`, except that
decimals like `0.1` read as exact rationals, in this case `1/10`.
You can still specify inexact numbers with `#i` though.

```racket
#lang exact-decimal racket/base
0.1
```
produces `1/10`