This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: kawa numerics unstable


On 11/12/2009 04:28 PM, thomas kirk wrote:
thanks for the clarification. it's not a problem, was just
taken by surprise in places where i had assumed equalness
(i apparently need to watch the changelogs more closely).
the advantages you describe are worth the minor code
adaptations.

It you cast int to integer to will create a gnu.math.IntNum without creating as intermediate java.lang.Integer. This works:

(integer (java.lang.Integer:parseInt "1"))

as does:

(let ((i :: integer (java.lang.Integer:parseInt "1"))) (+ i i))

(The former is actually a constructor invocation, rather than a cast.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]