embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: MAKE-ROUND Use

From: Bulgrien, Dennis <Dennis.Bulgrien_at_TripointGlobal.com>
Date: Wed, 27 Feb 2002 13:35:12 -0600

Oops, I mean:

  FP-ROUND 0 + H@
  FP-ROUND 6 + H!

or prefereably:
0 CONSTANT FP_ROUND_ROUND
2 CONSTANT FP_ROUND_DOWN
4 CONSTANT FP_ROUND_UP
6 CONSTANT FP_ROUND_TRUNC

  FP-ROUND FP_ROUND_ROUND + H@
  FP-ROUND FP_ROUND_TRUNC + H!

-----Original Message-----
From: Bulgrien, Dennis
Sent: Wednesday, February 27, 2002 13:33
To: swiftx_at_forth.com
Subject: [swiftx] Re: MAKE-ROUND Use

The following code makes it happen but it is such a horrible solution. What
is says in English is "Whenever the floating point chip is set up for
truncation really set it to round to the nearest value instead." Its like
putting RAID in a Windex bottle to keep the flies off the window. Something
more intentional desired...

  FP-ROUND 6 + H@
  FP-ROUND 6 + H!

-----Original Message-----
From: Bulgrien, Dennis
Sent: Wednesday, February 27, 2002 13:16
To: swiftx_at_forth.com
Subject: [swiftx] MAKE-ROUND Use

SwiftX HOST is apparently set for ANS use of floating point truncation by
default. I need floating point operations on the host to be rounded to
match the higher precision target floating point calculations. Words such
as ROUND and MAKE-ROUND are intended to allow this to be changed prior to
calculations but I have not gotten them to work. Even changing the FPU
control word with $322 'FPOPT 2 + H! doesn't ($322 is 64-bit round nearest;
LOCATE FP-ROUND ). Any ideas?
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Wed Feb 27 2002 - 11:36:42 PST

This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:23 PST