HP Forums

Full Version: [Free42] DSE bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Thomas,

1e19
DSE ST X

skips and adds 8 instead of subtracting 1 (and not skipping).
I use that all the time as a shortcut for 1 -. Old habits die hard.
Up till 1e18 it's ok, 1e19 and up is wrong.

Cheers, Werner
(latest version 2.0.5. Of course)
(08-09-2017 08:50 PM)Werner Wrote: [ -> ]1e19
DSE ST X
skips and adds 8 instead of subtracting 1 (and not skipping).
(...)
(latest version 2.0.5. Of course)

FWIW: my Free42 Decimal version 1.5.5 from 2014 behaves the same.

Dieter
(08-09-2017 08:50 PM)Werner Wrote: [ -> ]Hello Thomas,

1e19
DSE ST X

skips and adds 8 instead of subtracting 1 (and not skipping).
I use that all the time as a shortcut for 1 -. Old habits die hard.
Up till 1e18 it's ok, 1e19 and up is wrong.

Cheers, Werner
(latest version 2.0.5. Of course)

The DSE and ISG code uses a 64-bit integer while breaking up the control variable into its components. That works fine in Free42 Binary, but can fail in Decimal, since the Decimal versions (both BCD20- and Intel-based) can represent integers that don't fit in 64 bits.

I'll fix this in 2.0.6.

I guess I should also take a look at the other functions that break up numbers in this manner, like HMS+. Seems unlikely to cause problems in practice, but a bug is a bug is a bug!
I fixed ISG and DSE in the Decimal versions.

→HMS, →HR, HMS+, and HMS- didn't have this 64-bit int issue, so those are unchanged.
Thanks, Thomas!
Werner
Reference URL's