HP Forums

Full Version: WP 34S and 31S bugs and fixes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(05-23-2017 12:00 PM)Briancady413 Wrote: [ -> ]I calculated e^(i*Pi) and got a real component of -1(as should be) plus a tiny imaginary component, which I believe shouldn't be there.

This is not a bug, it is the correct result.

Remember: pi is an irrational number with infinitely many digits. But your calculator uses only 16 resp. 34 digits, so you cannot enter pi, you can only enter a close approximation. The first 16 (or 34) digits are all you can provide. So you do not calculate e^(i*pi) but e^(i*3,141592653589793). The imaginary part of this is approx. pi – 3,141592653589793 so that you get i * 2,3846...E–16. Or switch to double precision and get i * –1,158...E–34.

The same happens if you try to calculate sin(pi). You won't get zero but again a very tiny residual. That's again because you do not calculate sin(pi) but sin(3,141592653589793) which is 2,3846 E–16.

Dieter
(05-23-2017 12:00 PM)Briancady413 Wrote: [ -> ]I calculated e^(i*Pi) and got a real component of -1(as should be) plus a tiny imaginary component, which I believe shouldn't be there. This is on an emulator running on ubuntu 16.04.2

If it's any consolation, the HP Prime gets

−1,-2.06761537357ᴇ−13*i

Tom L
(05-23-2017 01:18 PM)toml_12953 Wrote: [ -> ]If it's any consolation, the HP Prime gets

−1,-2.06761537357ᴇ−13*i

This should be the result from any 12-digit calculator (the 35s returns the same). The imaginary part of e^(i*pi) is sin(pi), resp. here sin(3,1415926...), which is approximately pi – 3,1415926... . The 12-digit machines use "pi"=3,14159265359, so the imaginary part here is ~ pi – 3,14159265359 = –2,06761537357 E–13.

In the same way a 10-digit calculator should return pi – 3,141592654 = –4,102067615 E–10.
But since most of these calculators internally use 13 digits for pi I'd expect not more than –4,10 E–10.

Dieter

Edit: corrected the value for 10-digit devices
(02-08-2017 06:49 AM)Paul Dale Wrote: [ -> ]Marcus is the battery voltage level expert from the 34S team.

Maybe my answer is a bit late but here it is:

BATT only reports the internal value so it does not consume any additional power for doing the measurement. The value is derived continuously from a circuit that compares the actual supply voltage to a given threshold. To determine the voltage the threshold is modified until a change in the comparator status bit is detected.

Since the answer is not delivered immediately by the hardware, the software has to wait some time before the readout. While the processor is running a heart beat interrupt is active which performs, among other things like the keyboard scan, the voltage measurement.
A bit late? No you are right on time! Apple has been in the news lately with a similar problem:
https://www.digitaltrends.com/mobile/app...o-upgrade/

Of course the Apple problem is different, given the rechargeable battery, and the fact that they are in trouble for a creative solution to the problem of declining battery capacity.

Maybe the WP-34S should do the same? Proactively slow down if the battery voltage is low? My sense is that it would not have helped me, because the old battery looked good to the firmware at startup, but rapidly faded once the intensive computations began. However, if the heartbeat is frequent enough, it maybe could have noticed the drop in V before dying.

Anyway, thanks for chiming in.

(01-20-2018 02:52 PM)Marcus von Cube Wrote: [ -> ]
(02-08-2017 06:49 AM)Paul Dale Wrote: [ -> ]Marcus is the battery voltage level expert from the 34S team.

Maybe my answer is a bit late but here it is:

BATT only reports the internal value so it does not consume any additional power for doing the measurement. The value is derived continuously from a circuit that compares the actual supply voltage to a given threshold. To determine the voltage the threshold is modified until a change in the comparator status bit is detected.

Since the answer is not delivered immediately by the hardware, the software has to wait some time before the readout. While the processor is running a heart beat interrupt is active which performs, among other things like the keyboard scan, the voltage measurement.
The firmware forces SLOW mode if the battery is below a certain threshold. I guess it would be possible to slow it down even more but there is a point at which it would become unbearable.

As an aside, there were a couple of times during development where the clock had been slowed to 32kHz and wasn't sped up properly. This made the device unbearably slow.


Pauli
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's