While I never considered or designed for 'negative decimal places' it appears
my version of F.N does do them - albeit with results different from tests I've
seen posted here.
Wondering if there was any convention for them, google turned up the ROUND()
function in Oracle and SQL. Online examples didn't show what happens at the
extremes (what I was interested in) but I did find an online SQL server where
I could test that. For SQL at least, the results were as follows.
SQL:
ROUND(876.543, 0) 877.000
ROUND(876.543,-1) 880.000
ROUND(876.543,-2) 900.000
ROUND(876.543,-3) <overflow error>
ROUND(456.789, 0) 457.000
ROUND(456.789,-1) 460.000
ROUND(456.789,-2) 500.000
ROUND(456.789,-3) .000
F.N (dxf):
876.543e 0 f.n 877.
876.543e -1 f.n 880.
876.543e -2 f.n 900.
876.543e -3 f.n 1000.
456.789e 0 f.n 457.
456.789e -1 f.n 460.
456.789e -2 f.n 500.
456.789e -3 f.n 0.
Re: F.N floating point format word
- From
- dxf <dxfo…@gmail.com>
- Organization
- Ausics - https://newsgroups.ausics.net
- Message-ID
- <6ad3…@news.ausics.net>
- Date
- Newsgroups
- comp.lang.forth