03-16-2020, 06:31 AM

Condition number for a function f(x) is:

Cond = abs( x * d/dx f(x) / f(x) )

If the condition number is low, then function is not sensitive to small changes. This is similar to the condition number for matrices, where a low number gives for a well-conditioned problem while a higher number gives for an ill-conditioned problem.

HP Prime Program CONDFX

Arguments: f(X) as a string, use the capital X as a variable; a: value

Syntax: CONDFX(f, a)

Note: The derivative is calculated manually.

Example: (in Radians mode)

CONDFX("2*X*COS(X)",1.5) returns 20.15361502

CONDFX("e^-(.25*X)",1.5) returns 0.374995308312

Blog link: http://edspi31415.blogspot.com/2020/03/h...ition.html

Cond = abs( x * d/dx f(x) / f(x) )

If the condition number is low, then function is not sensitive to small changes. This is similar to the condition number for matrices, where a low number gives for a well-conditioned problem while a higher number gives for an ill-conditioned problem.

HP Prime Program CONDFX

Arguments: f(X) as a string, use the capital X as a variable; a: value

Syntax: CONDFX(f, a)

Code:

`EXPORT CONDFX(f,a)`

BEGIN

// f(X) as a string, x0

// 2020-02-06 EWS

X:=a;

fx:=EXPR(f);

X:=a+.0001;

dx:=(EXPR(f)-fx)/.0001;

c:=ABS(a*dx/fx);

RETURN c;

END;

Note: The derivative is calculated manually.

Example: (in Radians mode)

CONDFX("2*X*COS(X)",1.5) returns 20.15361502

CONDFX("e^-(.25*X)",1.5) returns 0.374995308312

Blog link: http://edspi31415.blogspot.com/2020/03/h...ition.html