On Sun, 18 Oct 2026 00:57:50 +1100 dxf <dxfo…@gmail.com> wrote:
> 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. >
F.N (pf) 876.543e 0 f.n 877. ok 876.543e -1 f.n 880 ok 876.543e -2 f.n 900 ok 876.543e -3 f.n 900 ok 456.789e 0 f.n 457. ok 456.789e -1 f.n 460 ok 456.789e -2 f.n 500 ok 456.789e -3 f.n 500 ok