Navigation
Synopsis Determine the largest of two numeric values.
Function &T <: num max(&T <: num N, &T <: num M)
Usage import util::Math;
Description The largest of two numbers. The type of the result is the same as the type of the largest argument.
Examples
rascal>import util::Math;
ok
rascal>max(12, 13);
int: 13
rascal>max(12, 13.5);
num: 13.5
rascal>max(12, 11.5);
num: 12

Questions
Question [1].
The type of max(-3, -16) is

Question [2].
The type of max(8, -4.9552376403936280) is

Question [3].
max(-4.05044552451012240, -2) == 

Question [4].
max(-19.702383389548483440, ) == -2.213567344676977440

Question [5].
max(-18, ) == -18



Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.