Dilwyn,

Writing such routines from scratch is likely to be a non-trivial task!

The c68 library has a whole set of support routines written in assembler for
this purpose that conform to the IEEE standard for Double Precision floating
point.   I suspect it would not be that hard to put some Basic keywords at
the front-end of them to make them accessible from SuperBasic.   They have
the advantage that they have been put through a formal test suite to check
that they give the correct answers which might be important?

If you could give an indication of how you expect to use them then I could
have a quick look to see if I think the c68 routines could be adapted to
that purpose.  It would be nice to know what operations you want to carry
out if it is more than simply arithmetic operations. Possibly important is
how you expect to load up and extract the values without losing precision.

Of course if you wanted to use them from C then they are ready to go - you
just need to use the 'long double' data type.

Dave Walker

Tel:  +44 (0)1707 652791
Mob: +44 (0)7999 218953
Web: http://www.itimpi.com
Skype:  itimpi

> -----Original Message-----
> From: ql-users-boun...@lists.q-v-d.com [mailto:ql-users-
> boun...@lists.q-v-d.com] On Behalf Of Dilwyn Jones
> Sent: 10 May 2011 18:14
> To: ql-users@lists.q-v-d.com
> Subject: [Ql-Users] Arithmetic precision
> 
> Does anyone know of any routines for the QL which can handle double
> precision floating point maths?
> 
> When asked, all I could think of was Helmut AInger's math toolkit, but
> I haven't looked at it yet.
> 
> Alternatively, if anyone knows how to write such a routine (a BASIC
> demo would do) or has a sample listing showing how to achieve this I'd
> be very grateful.
> 
> At this stage, accuracy is more important than speed.
> 
> Dilwyn Jones
> 
> 
> 
> _______________________________________________
> QL-Users Mailing List
> http://www.q-v-d.demon.co.uk/smsqe.htm

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to