[plt-scheme] Is plt-scheme appropriate for applications that use currency?

From: Scott Hickey (jshickey at yahoo.com)
Date: Mon May 7 15:04:30 EDT 2007

I have been taking a closer look at Scheme and trying to understand the numeric types. In nearly every language I've examined, the default numeric representation for numbers with a decimal place is binary floating point. Thus, asserts like *like* (actually numbers differ by language) 1.1 + 0.1 == 1.2 fail. This obviously doesn't work well in any application involving currency.

In languages like Java and Ruby, I can get around this by explicitly declaring numbers to be of type BigDecimal. In Groovy (http://groovy.codehaus.org) and Rexx (http://www.rexxla.org/), this math support is there by default for numeric literals. 

Can someone clarify what happens in plt-scheme or Scheme in general? TIA.

Scott Hickey

Posted on the users mailing list.