The following warnings occurred:
Warning [2] Undefined array key 11287 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 11287 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP-17BII Precision: Epsilon



#2

Calculating Epsilon on the HP-17BII

I wrote a program to compute 'Epsilon' which---in computational context---means the
smallest number (in the computer) that may be added to one and yield a result
that is greater than one. It is a measure of the precision that the
computer uses to represent numbers (really the number of bits used for the
mantissa).

I first wrote a traditional "Epsilon" equation for the HP-17BII, but I
realized that the number storage was not the standard binary floating point,
but rather some form of binary-coded-decimal. As a result, the original
"Epsilon" program yielded an incorrect result. The general algorithm
may be used on any machine that stores floating point numbers in an IEEE-like
format. So, I re-wrote the equation for a binary-coded-decimal machine.
The new equation yields the correct result for the HP-17BII; the Epsilon
is 5.00000000001e-12 (twelve digits in the mantissa).

Binary Floating-Point Epsilon algorithm---INCORRECT for HP-17BII:

Epsilon = 1;
while ((1 + Epsilon) > 1) {
Epsilon /= 2;
}
Epsilon *= 2;

Below is the HP-17BII equation. Please note that in the listing below
"SIGMA" means the sigma symbol:

In the ALPHA menu:

[WXYZ][OTHER][MORE],

then the second button

Binary-Coded-Decimal equation for the HP-17BII:

EPSILON: 0*L(E:1)*
SIGMA(N:1:25:1:(
SIGMA(I:1:9:1:
IF(1+L(X:(G(E)-I*10^(-N)))>1:
L(NEWE:G(X))
:
0
)
)
+L(OLDE:G(E))
+L(E:G(NEWE))
)
)
+
IF(G(OLDE)>G(E):
0
:
G(E)
)
=EPSILON

The extra code concerning the "OLDE" variable is just to make sure
that we have looped far enough. If Epsilon comes back as zero, then we
need to search more powers of ten in the "N" loop (i.e. increasing
the value of 25 here).


Possibly Related Threads…
Thread Author Replies Views Last Post
  Solver issue with HP 17BII - different from 19BII Jeff Kearns 13 4,402 11-28-2013, 02:36 AM
Last Post: Don Shepherd
  17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 2,787 11-25-2013, 10:28 AM
Last Post: Don Shepherd
  HP Prime numerical precision in CAS and HOME Javier Goizueta 5 2,316 11-16-2013, 03:51 AM
Last Post: Paul Dale
  Is the Prime a superset of the HP 17bII+ ? vrrr 3 1,568 10-16-2013, 12:03 PM
Last Post: Michael de Estrada
  hp 17bii+ dates calculation... JoePaul 6 2,329 07-14-2013, 11:32 AM
Last Post: Katie Wasserman
  HP-17bII+ emulator problem (TW?) fhub 7 2,284 06-23-2013, 09:57 AM
Last Post: Olivier De Smet
  [wp34s] Converting to/from IEEE 754 Binary64 (Double Precision) David Maier 1 1,091 06-15-2013, 09:21 PM
Last Post: Paul Dale
  Precision DC-50 Mic 3 1,478 05-26-2013, 01:27 PM
Last Post: DavidM
  HP-17bII+ Solve Compatibility Issues Robert Prosperi 7 2,803 04-22-2013, 10:11 PM
Last Post: Gerson W. Barbosa
  A very long HP-17BII equation Gerson W. Barbosa 22 5,106 04-19-2013, 12:37 AM
Last Post: Gerson W. Barbosa

Forum Jump: