! Functie pentru grafic:
function f_exp(x)
use work
f_exp =exp(x)-p*x**2
end


function f_exp15(x)
!f_exp15 =exp(x) -3.7*x**1.5
f_exp15 =exp(x) -3.7*(x*x)**(1./3.)
end

real function f_mull(x)
! Pol. muller pt. exp3

f(y) =exp(y) -3*y*y

x0 =0.6; x1 =0.8; x2 =1.0;

c =f(x2)

f10 =(f(x0)-f(x1))/(x0-x1)
f02 =(f(x2)-f(x0))/(x2-x0)
f21 =(f(x1)-f(x2))/(x1-x2)

b =f21 +f02 -f10

a =(f10 -f21)/(x0-x2)

y =x -x2
f_mull =a*y**2 +b*y +c
end

function D1(x)
D1 =sqrt(2.25 -(x-5)*(x-5))
end

function D1_(x)
!D1_ =-D1(x)             !
D1_ =-sqrt(2.25 -(x-5)*(x-5))
end

function tan_5_d(x)
!f =tan(x)-(8-x)/(x+0.2)
!f1 =1/(cos(x))**2 -8.2/(x+0.2)**2
tan_5_d = 1/(cos(x))**2 -8.2/(x+0.2)**2
end

function cos99(x)
!cos99 =1.6 +.99*cos(x)-x
!cos99 =1.5 +0.9*cos(x) +0.1*sin(x) -x
cos99 =1.5 -0.9*cos(x) -0.1*sin(x) +x

end

function sin99(x)
sin99 =1.6 +.99*sin(x)-x
end

function a6_I(x)
use work
a6_I =x +exp(-p*x*x)*cos(x)
end

function a63(x)
use work
!f =-x +exp(-p*x*x*x)*cos(x)
a63 =-x +exp(-p*x*x*x)*cos(x)
! p =40
end

function f_q(x)
pi =3.141593
f_q =3*(pi+2*x) +5*(pi +2*x)*cos(2*x) - 2*sin(2*x)
end

! idem f_q:
function q(x)
use work
q =3*x +5*(p+x)*cos(x) -2*sin(x)
end

function p3(x)  ! noise
p3 =x*x*x -3.6*x*x +4.32*x -1.728
end

real function triple(x)  ! noise
triple =x*x*x*x -5*x*x*x +9*x*x -7*x +2
end

function p16_1(x)  ! noise
p16_1 =x*x +x -(sin(x))**2 -1
end

! Frank-Kamanetski: 7/1
function f_k(x)  ! 
c =sqrt(0.044)
f_k =acosh(x) -c*x
end

function f_ss(x)  ! 
! S&S - mod: 2.331967655883964
!f_ss  =sqrt(x*x +2*x+2) -2*sin(x) -x -1
!f_ss  =sqrt(x*x +2*x+2) -2*sin(x) -x +0.92      ! 7.8; 8.1

f_ss  =sqrt(x*x +2*x+2) -2*sin(x) -x +0.94      ! 7.8; 8.0

!f_ss  =sqrt(x*x +2*x+2) -2*sin(x) -x +0.95     ! no root
end

function f53(x) ! 5/III -insta
f53 =0.61 +1.07*cos(x) -x
end


