Post Reply 
Machine epsilon of the HP Prime
09-17-2022, 04:28 PM
Post: #1
Machine epsilon of the HP Prime
// program mach_eps HP Prime

// September 17, 2022

// machine epsilon of the HP Prime

// From Wikipedia;

// "Machine epsilon or machine precision is an upper bound
// on the relative approximation error due to rounding in
// floating point arithmetic. This value characterizes
// computer arithmetic in the field of numerical analysis,
// and by extension in the subject of computational science."

/////////////////////////////////////////////////////////////

export mach_eps()

begin

local epsmach;

local one := 1.0;

local two := 2.0;

local u := 1.0;

repeat

u := u / two;

until ((one + u) = one);

epsmach := u;

print();

print("machine epsilon of the HP Prime");

print("\neps = " + epsmach);

print("\n1.0 + eps = " + (1.0 + epsmach));

end;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Machine epsilon of the HP Prime - cdeaglejr - 09-17-2022 04:28 PM
RE: Machine epsilon of the HP Prime - EdS2 - 09-19-2022, 01:05 PM
RE: Machine epsilon of the HP Prime - EdS2 - 09-18-2022, 08:11 AM
RE: Machine epsilon of the HP Prime - EdS2 - 09-19-2022, 06:31 AM



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