Verify operation of newFunction and eval
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine testFunction
!! Verify operation of newFunction and eval
call setup(fileName='testsExpression-%n.svg',figSize=[400,300])
! call doFunction('f(x) = x+1j',[-2.0_wp,2.0_wp])
call doFunction('f(x) = x+1',[-2.0_wp,2.0_wp])
call doFunction('f(x) = x-1',[-2.0_wp,2.0_wp])
call doFunction('f(x) = 2*x',[-2.0_wp,2.0_wp])
call doFunction('f(x) = x/2',[-2.0_wp,2.0_wp])
call doFunction('f(x) = x^2',[-2.0_wp,2.0_wp])
call doFunction('f(x) = sqrt(x^2)',[-2.0_wp,2.0_wp])
call doFunction('f(x) = abs(x)',[-2.0_wp,2.0_wp])
call doFunction('f(x) = exp(x)',[0.0_wp,1.0_wp])
call doFunction('f(x) = log(exp(x))',[0.0_wp,1.0_wp])
call doFunction('f(x) = sin(x)',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = asin(sin(x))',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = cos(x)',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = acos(cos(x))',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = 2*(x+1)/3',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = (x+1)*(x-1)/6',[0.0_wp,2.0_wp*PI])
call doFunction('f(x) = 4*(x+1)/(x^2+1)',[0.0_wp,2.0_wp*PI])
call show()
end subroutine testFunction