Re: Arithmetic rounding

From: Bernhard Treutwein <"Bernhard>
Date: Tue, 18 Jun 2002 19:48:09 +0200

----boundary-LibPST-iamunique-1896631081_-_-
Content-type: text/plain

Dear Robertm

although I'm not an assembler guru, I would like to
point you to GSL. As far as I know, the GSL (Gnu
Scientific Library) provides full support of the rounding
options of the FPU.

You might check their C code to get some clues.

Main page is http://sources.redhat.com/gsl/
Reference manual is at http://sources.redhat.com/gsl/ref/gsl-ref_toc.html
Source browsing at:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/gsl/?cvsroot=gsl
I think the relevant stuff is in
http://sources.redhat.com/cgi-bin/cvsweb.cgi/gsl/ieee-utils/?cvsroot=gsl

hope that helps

    Bernhard

----- Original Message -----
From: <robert.d.campbell{([at]})nowhere.xy
To: <blackbox{([at]})nowhere.xy
Sent: Monday, June 17, 2002 1:59 PM
Subject: Arithmetic rounding


>
>
> IEEE floating point defines four rounding modes:
>
> 'round to nearest'
> 'round to minus infinity'
> 'round to plus infinity'

> &
> 'round to zero'.
>
> I presume that Pentiums and Athlons support these options
> at the hardware level. I also presume (hope !) that Component
> Pascal operations *, /, +, - use the 'round to nearest' mode.
>
> I am contemplating writing some 'interval arithmetic' routines
> (for seriously safe calculations). To do this I would like routines
> for the four basic 64-arithmetic operations using each of the
> 'round to +/- infinity' modes.

>
> Is there anyone who has the required knowledge of Intel assembler
> prepared to give me some clues?
>
>
> Cheers
>
> Robert Campbell
>
> --------------------------------------------
>
> To unsubscribe from this mailing list, send a message containing the word
"unsubscribe" to:
> blackbox-request{([at]})nowhere.xy
>
> To get a list of valid e-mail commands and instructions on their usage,
send a message containing the word "help" to the above address.
>
> Send any problem reports or questions related to this email list to the
list owner at
> owner-blackbox{([at]})nowhere.xy
>
> Current posting policy:
>
> a) To post you should use the same address by which you are subscribed to
the mailing list. That way, the list server will recognize you as subscriber
and forward your posting immediately, without creating any overhead.
>
> b) If, for some reason, you cannot post from the address, by which you are
subscribed, your message will be moderated to avoid spam. Please understand
that moderation will often cause some delay, in particular over weekends or
holydays.

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.

----boundary-LibPST-iamunique-1896631081_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERlYXIgUm9iZXJ0bVxwYXINClxwYXINCmFsdGhv
dWdoIEknbSBub3QgYW4gYXNzZW1ibGVyIGd1cnUsIEkgd291bGQgbGlrZSB0b1xwYXINCnBvaW50
IHlvdSB0byBHU0wuIEFzIGZhciBhcyBJIGtub3csIHRoZSBHU0wgKEdudVxwYXINClNjaWVudGlm
aWMgTGlicmFyeSkgcHJvdmlkZXMgZnVsbCBzdXBwb3J0IG9mIHRoZSByb3VuZGluZ1xwYXINCm9w
dGlvbnMgb2YgdGhlIEZQVS5ccGFyDQpccGFyDQpZb3UgbWlnaHQgY2hlY2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SwgdGhl
IGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlvdSBhcyBzdWJzY3JpYmVyIGFuZCBmb3J3YXJk
IHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0aG91dCBjcmVhdGluZyBhbnkgb3ZlcmhlYWQu
XHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJlYXNvbiwgeW91IGNhbm5vdCBwb3N0IGZyb20g
dGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCwgeW91ciBtZXNzYWdlIHdp
bGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0uIFBsZWFzZSB1bmRlcnN0YW5kIHRoYXQgbW9k
ZXJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNvbWUgZGVsYXksIGluIHBhcnRpY3VsYXIgb3ZlciB3
ZWVrZW5kcyBvciB9fQAzA2B1bmQLgGcdtDpv


----boundary-LibPST-iamunique-1896631081_-_---
Received on Tue Jun 18 2002 - 19:48:09 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:42 UTC