Would *default-precision* make sense?

2009-06-29 Thread arasoft
At least I believe so: it would allow client code to set the desired precision once and then be able to invoke functions that take an optional precision parameter (or none at all) without having to specify precision every time. For example: (set! *default-precision* (.

Re: Would *default-precision* make sense?

2009-06-29 Thread arasoft
I very much like your idea of setting *math-context* (I was looking for something like that, but could not find it in the documentation), but how do I do it globally? user= (set! *math-context* java.math.MathContext/DECIMAL128) #CompilerException java.lang.IllegalStateException: Can't change/

Re: Would *default-precision* make sense?

2009-06-29 Thread Nicolas Oury
On Mon, 2009-06-29 at 07:04 -0700, arasoft wrote: I very much like your idea of setting *math-context* (I was looking for something like that, but could not find it in the documentation), but how do I do it globally? user= (set! *math-context* java.math.MathContext/DECIMAL128)

Re: Would *default-precision* make sense?

2009-06-29 Thread Stephen C. Gilardi
On Jun 29, 2009, at 10:11 AM, Nicolas Oury wrote: I am not sure, but I believe it's due to *warn-on-reflection* being bound by the compiler/REPL before evaluating (set! *warn-on- reflection* true). When I looked, the REPL was called within a macro 'with-bindings repl' that expands to

Re: Would *default-precision* make sense?

2009-06-29 Thread Rich Hickey
On Mon, Jun 29, 2009 at 10:51 AM, Stephen C. Gilardisquee...@mac.com wrote: On Jun 29, 2009, at 10:11 AM, Nicolas Oury wrote: I am not sure, but I believe it's due to *warn-on-reflection* being bound by the compiler/REPL before evaluating (set! *warn-on-reflection* true). When I looked,

Re: Would *default-precision* make sense?

2009-06-29 Thread arasoft
I'm obviously all for it... On Jun 29, 5:53 pm, Rich Hickey richhic...@gmail.com wrote: On Mon, Jun 29, 2009 at 10:51 AM, Stephen C. Gilardisquee...@mac.com wrote: On Jun 29, 2009, at 10:11 AM, Nicolas Oury wrote: I am not sure, but I believe it's due to *warn-on-reflection* being bound