ir/tests/c/abs_002.irt
2022-04-21 01:00:46 +03:00

20 lines
253 B
Plaintext

--TEST--
002: abs function
--ARGS--
--emit-c
--CODE--
{
l_1 = START(l_4);
double x = PARAM(l_1, "x", 1);
double ret = ABS(x);
l_4 = RETURN(l_1, ret);
}
--EXPECT--
double test(double x)
{
double d_1 = x;
double d_2;
d_2 = fabs(d_1)
return d_2;
}