Post Reply 
Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
03-01-2014, 11:24 PM
Post: #21
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
(03-01-2014 09:14 PM)Thomas Okken Wrote:  I uploaded the Windows build. I used VC++ 2008 to compile the Intel library and Free42 proper.
I have only tested this on Windows 7, but I assume it will work in XP, too, though maybe that will require bundling the VC++ 2008 runtime.

Since this thread is now on its second page, here's the download link again: http://thomasokken.com/free42/download/intel-decimal/


It works fine here (WinXP Pro, SP3). Thanks!

9 SIN COS TAN ATAN ACOS ASIN 9 - --> -3.05965e-28
Find all posts by this user
Quote this message in a reply
03-02-2014, 12:47 AM
Post: #22
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
I uploaded the OS X version. This is a 64-bit app, so you need to run the 64-bit kernel. I expect that most people do that anyway, but I have to mention this because there is still an incompatibility between Free42's 32-bit and 64-bit state files; if you're going to try the new OS X build, back up $HOME/Library/Application Support/Free42/state first!
I built this on 10.7 using the 10.7 SDK, but it seems to work on 10.6 as well.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 12:55 AM
Post: #23
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
(03-01-2014 11:24 PM)Gerson W. Barbosa Wrote:  It works fine here (WinXP Pro, SP3). Thanks!

Good to know -- thanks!
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 08:45 AM
Post: #24
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Works fine for me (Win7).
Speed of matrix routines seems the same as the 25-digit version.
Trigs are like 6 times faster. So those lookup tables pay off ;-)
The value of PI is not correct to 34 digits - last digit is an 8 while it should be a 3.
And of course, round-to-even works!
I'll keep playing with various functions..
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
03-02-2014, 09:37 AM
Post: #25
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Thanks for this new version preview, I already like it: the 34 digits are great!
Works fine on Win8-64bits.

A little bug report:
99 10 MOD --> -1

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 09:42 AM
Post: #26
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Finally a calculator that compares to the 34S in accuracy.....

Well done!


- Pauli
Find all posts by this user
Quote this message in a reply
03-02-2014, 10:22 AM (This post was last modified: 03-02-2014 10:23 AM by J-F Garnier.)
Post: #27
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview
Werner Wrote:The value of PI is not correct to 34 digits - last digit is an 8 while it should be a 3.

It seems to be a problem with the user pi constant.
in RAD mode, 0 ACOS 2 * gives ... 502, almost the right value.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 11:06 AM
Post: #28
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
The 34S comes up with ...502 following that sequence too so I kind of suspect that that the is the correctly rounded answer in 34 digit precision. Not that I trust the 34S's result in double precision mode all that much, but two separate implementations attempting to do the right thing coming up with the same answer is compelling to some degree.

I just checked with wolfram alpha and ACOS(0) ends ...751(44) so the correctly rounded result will be ...502. The joys of two rounding steps Smile


- Pauli
Find all posts by this user
Quote this message in a reply
03-02-2014, 11:25 AM
Post: #29
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Paul Dale Wrote:  I just checked with wolfram alpha and ACOS(0) ends ...751(44) so the correctly rounded result will be ...502. The joys of two rounding steps Smile

??

d:-?
Find all posts by this user
Quote this message in a reply
03-02-2014, 11:35 AM (This post was last modified: 03-02-2014 11:49 AM by Werner.)
Post: #30
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Paul: Since PI in that region is ..502(88), the correctly rounded value for PI is ..503.
But the correctly rounded value for 2*ACOS(0) is ..502 ;-)
And 4*ATAN(1) returns ..503 as it should. On the WP34 as well as on Free42 Intel.
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
03-02-2014, 02:14 PM (This post was last modified: 03-02-2014 02:15 PM by Gerson W. Barbosa.)
Post: #31
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
(03-02-2014 11:44 AM)fhub Wrote:  
(03-02-2014 09:42 AM)Paul Dale Wrote:  Finally a calculator that compares to the 34S in accuracy.....
Maybe a dumb question (I'm using Free42 rather seldom), but is there any way to display all these extra (internal) digits in the Free42?

Franz


Glen Sanft's FWIW program here was a nice way, but unfortunately it doesn't work anymore. Anyway, for the last 12 digits of PI, for instance, we'd only have to multiply it by 1E21 and take the fractional part:

PI E 21 * FP -> 6.43383279508e-1

As Werner noticed, the last digit should be a 3, not an 8.

Gerson.
Find all posts by this user
Quote this message in a reply
03-02-2014, 02:45 PM (This post was last modified: 03-04-2014 03:42 PM by J-F Garnier.)
Post: #32
RE:Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
You can even display the next PI decimals down to the 67th place, since this new Free42 (as the regular HP42S) 'knows' PI in double precision:

Code:
PI SIN            ; calculates the residual vs real PI value
1E-33 +           ; adjust to positive value
1E45 * IP         ; digits 34-45 are: 884 197 169 399
LAST FP 1E12 * IP ; digits 46-57 are: 375 105 820 974
LAST FP 1E12 *    ; digits 58-67 are: 944 592 307 8

All digits are correct, thanks Intel!

[edited after the fix of the PI value in Free42]
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 06:26 PM (This post was last modified: 03-02-2014 06:59 PM by Werner.)
Post: #33
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
Perhaps that can be implemented in SHOW that now shows 12 digits only.

BTW I can change the sign of 0 ;-)
And GAMMA doesn't work correctly

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
03-02-2014, 08:11 PM
Post: #34
RE:Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
J-F Garnier Wrote:
Werner Wrote:The value of PI is not correct to 34 digits - last digit is an 8 while it should be a 3.
It seems to be a problem with the user pi constant.
in RAD mode, 0 ACOS 2 * gives ... 502, almost the right value.

The issue of the incorrect PI constant seems to also affect ->RAD, ->DEG and (in RAD mode) ->POL. But not ->REC, apparently.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 08:14 PM (This post was last modified: 03-02-2014 10:39 PM by Thomas Okken.)
Post: #35
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
I fixed PI, MOD, and GAMMA, and uploaded new builds.

I also made some changes to the state file reading and writing code. The incompatibilities between 32-bit and 64-bit, and when switching from decimal to binary, now seem to be fixed. Note that this does mean you'll get a State File Corrupt message when you run these new builds, because of alignment changes inside the file. Also, compatibility when going from 1.4.78 or earlier to 1.4.79 is still broken; I'll fix that before the official release, but not this weekend.

Re: changing the sign of zero: that's IEEE 754. Signed zeroes! Works in the binary version, too.

Re: showing all 34 digits: I guess it would be nice if there were an option to make SHOW show full precision. Until I get around to that, I imagine adapting Glen Sanft's FWIW program shouldn't be too difficult.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 09:19 PM (This post was last modified: 03-02-2014 09:20 PM by Thomas Okken.)
Post: #36
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
(03-02-2014 12:55 AM)Thomas Okken Wrote:  
(03-01-2014 11:24 PM)Gerson W. Barbosa Wrote:  It works fine here (WinXP Pro, SP3). Thanks!

Good to know -- thanks!

I just did a fresh install of XP Pro SP3, with all updates, on a new VM, and it doesn't run there. I'm guessing Gerson has something else installed that installed the VC++ 2008 runtime libraries under C:\Windows. This means I'll have to provide people with a link to the VC++ 2008 redistributable package, or link the executable statically. Bah!

I haven't tried it on a clean Windows 7 environment yet. Mine all have tons of software development tools on them, so of course everything Just Works™ for me anyway...
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 09:57 PM
Post: #37
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
(03-02-2014 08:14 PM)Thomas Okken Wrote:  Re: changing the sign of zero: that's IEEE 754. Signed zeroes! Works in the binary version, too.

Good. Calculators should support signed zeros Smile


- Pauli
Find all posts by this user
Quote this message in a reply
03-02-2014, 10:49 PM (This post was last modified: 03-02-2014 10:49 PM by Gerson W. Barbosa.)
Post: #38
RE: Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
(03-02-2014 09:19 PM)Thomas Okken Wrote:  I just did a fresh install of XP Pro SP3, with all updates, on a new VM, and it doesn't run there. I'm guessing Gerson has something else installed that installed the VC++ 2008 runtime libraries under C:\Windows. This means I'll have to provide people with a link to the VC++ 2008 redistributable package, or link the executable statically. Bah!

Double bah! I'd manually searched through my System32 folder for files starting with vc before posting and didn't find any. Sorry!
Find all posts by this user
Quote this message in a reply
03-02-2014, 10:59 PM
Post: #39
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
(03-02-2014 08:14 PM)Thomas Okken Wrote:  Note that this does mean you'll get a State File Corrupt message when you run these new builds, because of alignment changes inside the file. Also, compatibility when going from 1.4.78 or earlier to 1.4.79 is still broken

I'm going to change the state file format to something EBML-based. This is going to delay the official 1.4.79 by a week or two, but it's long overdue... Every time I change anything about the state, like adding a setting or changing representations, I currently have to break forward compatibility. Also, writing and maintaining the code that has to deal with all these state file variations, to maintain backward compatibility, is a huge pain. Free42 1.4.79 has a lot of problems in this regard, because the BCD20 library's BCDFloat type is an array of eight two-byte integers, while the Intel library's BID_UINT128 type is a struct of two eight-byte integers, and this causes compilers to change the layout of structs that incorporate these types...

With EBML, forward compatibility will be trivial (older versions will simply ignore newer state items they don't recognize), and it will become possible to move state files between devices with different CPU architectures, and that will make it much easier for me to debug problems with state file reading and writing.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2014, 11:01 PM (This post was last modified: 03-02-2014 11:22 PM by Thomas Okken.)
Post: #40
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
(03-02-2014 10:49 PM)Gerson W. Barbosa Wrote:  
(03-02-2014 09:19 PM)Thomas Okken Wrote:  I just did a fresh install of XP Pro SP3, with all updates, on a new VM, and it doesn't run there. I'm guessing Gerson has something else installed that installed the VC++ 2008 runtime libraries under C:\Windows. This means I'll have to provide people with a link to the VC++ 2008 redistributable package, or link the executable statically. Bah!

Double bah! I'd manually searched through my System32 folder for files starting with vc before posting and didn't find any. Sorry!

I think they're called something like msvcr90.dll etc...
No need to apologize, BTW. I appreciate that you tried to check. I anticipated this problem, and even when you told me that it was OK, my professional-software-developer paranoia made me double-check anyway. And next weekend I'm going to do the same for Windows 7.
Good times! :-D
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)