fmax - This function returns the biggest of the 2 var chosen by the user.
fmax(x,y)
This mathematical function returns the biggest value between the two variables x and y chosen by the user.
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function with integers:
test(q(res={_{fmax(3,4);}}.),q(res=4.));
With floats:
t(q(res={_{fmax(2.5,3);}}.),q(res=3.));
One can use this function with another variable:
test(q(res={_{
%include "/includes/extenso.sn";
a=3;
fmax(a,4);
}}.),
q(res=4.));
With a trigonometric function:
test(q(res={_{
%include "/includes/extenso.sn";
a=cos(0);
fmax(a,0);
}}.),
q(res=1.));
With negative numbers:
test(q(res={_{fmax(-3,2);}}.),q(res=2.));
One can also consider the limits:
test(q(res={_{fmax(-INF,INF);}}.),q(res=INF.));
With an array, it simply considers its number of elements:
test(q(res={_{fmax(3,[1,2]);}}.),q(res=3.));
Written by Caroline Laplante, <claplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com