After thinking about it some more (bigdec (/ 1 3)) should be equivalent to (/ 1M 3) which actually throws the ArithmeticException, so this would do away with the need for decimalValueSafe, and bigdec should simply perform a division on a ratio.
I have uploaded a second diff [1] that has these simplifications. [1] http://clojure.googlegroups.com/web/ratio-conv+(2).diff?gda=zre3aEkAAAC2LrkjeC7f10uHiY7GOiyxdqJZOaYW4q8ZHs8sx1e8M2XHLRYLb8AB-eTu0xj-MyKSUG1zri_Ll5ztwj3wVBSLhAioEG5q2hncZWbpWmJ7IQ&gsc=osaozyEAAAAi_SCcMOJLCoSCfjwTyPjcxrB-ivKiC1X5wCEM4Py6h0zfKN-m9S9niuHrq-IEXAE --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---