mirror of
https://github.com/danog/ir.git
synced 2024-12-12 09:19:47 +01:00
20 lines
253 B
Plaintext
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;
|
||
|
}
|