HP-15C LE calculator forensics? - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)

HP-15C LE calculator forensics? - Joel Setton (France) - 09-10-2011

Folks,
Has anyone run the Calculator Forensics formula on the HP-15C LE?
Just being curious, mine is still awaiting shipment in some distant warehouse...
Joel Setton

Re: HP-15C LE calculator forensics? - Katie Wasserman - 09-10-2011

It has to be the same as the original 15c, it's just an emulator running the 15c ROM image.

Re: HP-15C LE calculator forensics? - Mike Morrow - 09-10-2011

Yes, the numerical results are always identical between the 15C and 15C-LE. Even the sequence of random numbers generated after reset with the RAN# command is identical.

Re: HP-15C LE calculator forensics? - John B. Smitherman - 09-10-2011

I would be interested in the results of the calculator torture tests:Torture

John

Re: HP-15C LE calculator forensics? - Gerson W. Barbosa - 09-10-2011

BTW, even the 12C Platinum can be programmed to replicate the original 15C forensic results. From article #654:

```1) asin(acos(atan(tan(cos(sin(9)))))):
Keystrokes                Display
9 			9.
R/S                  	0.156434465
g GTO 090 R/S 		0.999996273
g GTO 100 R/S 		0.017455000
g GTO 178 R/S 		0.999996272
g GTO 157 R/S 		0.156441660
g GTO 137 R/S		9.000417403
```

Quote:
Even the sequence of random numbers generated after reset with the RAN# command is identical.

I will run the program in message #19 of this thread. The result should be

```534,912,768.0
```
That's a solution to Karl Schneider's interesting challenge, that is,
```5/34 + 9/12 + 7/68 = 1
```
No one should try this on his/her new HP-15C LE as it will take about 7 hours to run. I hope the batteries last that long :-) (Valentin Albillo presented later a faster 15C program, about 850 times as fast).

Re: HP-15C LE calculator forensics? - Thomas Klemm - 09-10-2011

I don't quite agree with the results for the HP-15C.

## round #1: accuracy of tan(355/226)

Quote:

But there's no way to enter 355/226 into this calculator. The best you can do is to calculate that number which is 1.570796460. That's why we have to compare the result of tan(1.570796460).

• HP-15C: -7,507,225.705
• Relative error: 7.7619 × 10-7 instead of 1.33x10-3

## round #2: cube root of -27

After setting complex mode (SF 8) I get the correct answer: 1.5000 + 2.5981i instead of Error 0.

## round #3: definite integration

3.5: integrate(sqrt(abs(x-1)), 0, 2)

The HP-15C has an issue with this integral. However
it's interesting that the correct answer is given rather fast when using 1 as the lower limit. I was astonished that this calculator has a problem with this function while both HP-32Sii and HP-48G don't have it since I assumed all use the same algorithm.

Thanks for pointing out this torture test.

Thomas

Re: HP-15C LE calculator forensics? - Dieter - 09-10-2011

Since we had this discussion on how the new 15C compares to the 35s, here are the results for the latter:

• Tan 355/226 = tan 1,57079646018 = -7497089,06507601...

The 35s result is -7497089,2551 => rel. error is just 2,5 E-8.

If 10 digits are used (like in the 15C LE example, i.e. tan 1,570796460) the error in the 35s result still is only 2,5 E-8.

• Cuberoot of -27: simply enter -27 [ENTER] 3 [XROOT] => -3. No error message, no complex mode required.

This also is another example that shows how useful an XROOT function is. It returns results where the usual approach -27 [ENTER] 3 [1/x] [y^x] will not work and throw an error - simply because 0,3333.... is not the same als 1/3.

Want a complex result? -27 i 0 [ENTER] 3 [1/x] [y^x] => 1,5000 i 2,5981.

• Integrate sqrt(abs(x-1)) from 0 to 2: In FIX 4 it takes a moment, but finally the 35s comes back with the correct result 1,3333.
That's why I still think the 35s is a nice calculator. Yes, it has its bugs, but these are known and I can work around them. ;-)

Dieter

Edited: 10 Sept 2011, 7:03 p.m.

Re: HP-15C LE calculator forensics? - Gerson W. Barbosa - 09-10-2011

Quote:
But there's no way to enter 355/226 into this calculator. The best you can do is to calculate that number which is 1.570796460. That's why we have to compare the result of tan(1.570796460).
• HP-15C: -7,507,225.705
• Relative error: 7.7619 × 10-7 instead of 1.33x10-3

You are right. It would not be fair to compare the calculators results with the exact result of tan(355/226).

```correct 16-digit answer, tan(1.570796460) = -7507219.878366671
calculator		displayed result	relative error
HP-45			-7.516790992E+06	1.27E-03
HP-29C, 32E, 15C, 41CX	-7507225.705		7.76E-07
HP-20S, 32SII, 28S, 48G	-7507219.87837		4.44E-13
hp 33s, 35s		-7507220.0689		2.54E-08
HP-25			-7518796.992		1.54E-03
wp34s			-7507219.878366671 	0.00E+00
```

Gerson.

Edited: 10 Sept 2011, 7:48 p.m.

Re: HP-15C LE calculator forensics? - Paul Dale - 09-10-2011

Quote:
Yes, it has its bugs, but these are known and I can work around them. ;-)

Some are known. How much faith do you have that all are? :-)

- Pauli

Re: HP-15C LE calculator forensics? - Thomas Klemm - 09-11-2011

Quote:
Integrate sqrt(abs(x-1)) from 0 to 2: In FIX 4 it takes a moment, but finally the 35s comes back with the correct result 1,3333.

How long is a moment? Because I stopped the integration on my HP-35s after a minute or so. I've tried both ways: using a program and an equation.

Does anybody have an idea what's going wrong here? To me this function doesn't apear to be wild. Ok, there's a singularity of the first derivative at x = 1. But why isn't it a problem when it is used as lower limit?

This is another function most HP calculators seem to have a problem with: f(x) = Sqrt[|x| (2 - |x|)]. It describes a circle with radius r = 1 and center at (1, 0) or (-1, 0).

Integrating this function from 0 to 2 is not a problem. But when the interval [-1, 1] is used it takes much longer or seems to never end.

While I knew that Romberg-integration has a problem with these kind of singularities I wasn't aware that this happens only when they are located inside the interval.

Thomas

Edited: 11 Sept 2011, 4:22 a.m.

Re: HP-15C LE calculator forensics? - Thomas Klemm - 09-11-2011

Quote:
Want a complex result? -27 i 0 [ENTER] 3 [1/x] [y^x] => 1,5000 i 2,5981.

Quote:
This also is another example that shows how useful an XROOT function is.

Just never try this in combination: -27 i 0 [ENTER] 3 [XROOT] => INVALID DATA

Duh!

Re: HP-15C LE calculator forensics? - Paul Dale - 09-11-2011

I kind of hope you weren't using the 34S as the 16 digit benchmark for this.

In this case, the 34S is correct but please nobody assume it is everywhere, I've done no theoretic error analysis and the number of values actually validated is tiny.

That all said, definitely let me know when it isn't correct within +/- 1 in the last digit :-)

- Pauli

Re: HP-15C LE calculator forensics? - Dieter - 09-11-2011

The 35s took 40 - 45 seconds for the integral in FIX 4 mode. The function had been entered as an equation. Since this elegant feature is available: use it. ;-)

Edit: I also tried the function you mentioned over [-1; 1] on the 35s. For a first look at the result I set FIX 2 and the result was returned immediately as 1,52 (last digit is off). FIX 3 returns 1,570 (correct within 1 ULP) after 16 seconds. Finally, FIX 4 requires two minutes, but comes back with the correct result 1,5708 as well. :-)

Dieter

Edited: 11 Sept 2011, 8:52 a.m.

Re: HP-15C LE calculator forensics? - Dieter - 09-11-2011

Yes, this combination cannot be used since XROOT does not work in the complex domain. This is documented in the manual.

But let us not forget that other calculators do not have such a function at all. ;-)

Dieter

Edited: 11 Sept 2011, 8:35 a.m.

Re: HP-15C LE calculator forensics? - Dieter - 09-11-2011

Pauli, if 39 digits of internal precision were not able to provide a correct 16 digit result you would have done something seriously wrong. ;-)

Dieter

Re: HP-15C LE calculator forensics? - Dieter - 09-11-2011

Quote:
You are right. It would not be fair to compare the calculators results with the exact result of tan(355/226).

correct 16-digit answer, tan(1.570796460) = -7507219.878366671

As already mentioned in a previous message, this tangent evaluation is extremely prone to errors. Since the argument may always be off by plus or minus 5 E-10, the tangent may vary by ~28000 (!) or a relative error of 3,7 E-3.

Yes, the tangent of 1,57079646000000000000000000000.... has the mentioned value, but in real life we are dealing with irrational numbers (i.e. #digits is infinite), so we cannot expect correct results for tan(x_close_to_pi/2) at all.

Dieter

Re: HP-15C LE calculator forensics? - Paul Dale - 09-11-2011

And to be honest, I'm not at all sure I haven't done something seriously wrong somewhere. There is a *lot* of numeric code in the 34S and some of it is bound to be slightly incorrect (or worse).

- Pauli

Re: HP-15C LE calculator forensics? - Dieter - 09-11-2011

Well, after four years of use now I am quite sure that all relevant bugs are known. As opposed to the brand new 15C which the community will still have to scrutinize. ;-)

Dieter

Re: HP-15C LE calculator forensics? - Gerson W. Barbosa - 09-11-2011

Quote:
I kind of hope you weren't using the 34S as the 16 digit benchmark for this.

.

I used WolframAlpha's result truncated at the second zero:

```-7.5072198783666710922545119574391592156309211475564175... × 10^6
```

This, of course, would sure match the wp34s's result :-)

Gerson.

Re: HP-15C LE calculator forensics? - Ángel Martin - 09-11-2011

I think that's called "programmer's remorse" (akin to the buyer's but more lonely :-)

I know, it also happens to me...