![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_FMAX opcode using C99 math.h fmax(). Accepts int or float; follows IEEE-754 NaN handling per fmax. More...
#include <math.h>
Go to the source code of this file.
Functions | |
| if (!((a.type==VAL_INT||a.type==VAL_FLOAT) &&(b.type==VAL_INT||b.type==VAL_FLOAT))) | |
| if (!isnan(r) &&!isinf(r) &&r >=(double) INT64_MIN &&r<=(double) INT64_MAX) | |
| free_value (a) | |
| free_value (b) | |
| push_value (vm, out) | |
Variables | |
| case | OP_FMAX |
| Value | a = pop_value(vm) |
| double | da = (a.type == VAL_FLOAT) ? a.d : (double)a.i |
| double | db = (b.type == VAL_FLOAT) ? b.d : (double)b.i |
| double | r = fmax(da, db) |
| Value | out |
| else | |
| break | |
Implements the OP_FMAX opcode using C99 math.h fmax(). Accepts int or float; follows IEEE-754 NaN handling per fmax.
Definition in file fmax.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| if | ( | ! | (a.type==VAL_INT||a.type==VAL_FLOAT) &&(b.type==VAL_INT||b.type==VAL_FLOAT) | ) |
| push_value | ( | vm | , |
| out | ) |
| else |