Scott Hickey <jscotthic...@gmail.com> writes:

Hi Scott,

> I'm looking to avoid qualifying every number that has a decimal point
> with an M. For the "business" applications I've built over the last 25
> years (credit card processing, healthcare claims, loans,etc.), there's
> never been a situation where inexact numbers were appropriate.

Nobody wants inexact numbers, but one has to trade speed with exactness.

And usually, you should refrain from using floating points at all, no
matter if BigDecimal or Double.  Clojure has rationals, so unless you
have to use java.lang.Math's functions or PI and E constants, you can
possibly do all calculations with rationals, and when you really need a
float, use (bigdec my-rational) to coerce it to a BigDecimal.

> That's why I was hoping for a global default for reading decimal
> numbers as BigDecimal instead of IEEE floats or doubles.

I've just checked, and that's hard-coded in clojure.lang.LispReader.

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to