You are on page 1of 4

PROGRAMAS HP PRIME

UNIDAD 1
METODO DE BISECCION
PASO 1 PRESIONAR SHIFT +1 EN LA CALCULDORA

PASO 2 PRESIONAR nuevo EN LA PANTALLA DE L A CALCULDORA

PASO 3 deber ingresar el nombre del programa

Ingresaremos el nombre de f

luego ok
PASO 4 copiamos el cdigo siguiente

EXPORT f(x)
BEGIN
x^22;
END;

PASO 5 luego comprobamos el cdigo presionando en la pantalla:

y deber aparecer el mensaje:

Luego hacemos ok
Luego esc

PASO 6 Ejecutamos el programa

EXPORT BISECCION()
BEGIN
LOCAL a,b,e,c;
INPUT({a,b,e});
WHILE ABS(ba)>e DO
c:=(a+b)/2;
IF f(a)*f(c)>0 THEN
a:=c;
ELSE
b:=c;
END;
END;
REPETIMOS
LA SECUAENCIA ANTERIOR PERO CON ESTE CODIGO EN EL PASO 4
PRINT(c);
END;

METODO DE NEWTON

EXPORT f(x)
BEGIN
x^22;
END;

EXPORT df(x)
BEGIN
2*x;
END;

EXPORT newton()
BEGIN
LOCAL x,e,iter;
INPUT ({x,e});
iter:=0;
WHILE ABS(f(x))>e DO
x:=x-f(x)/df(x);
iter:=iter+1;
END;
PRINT(x);
END;

You might also like