blob: 19e119381df1c2ae64d2e9d26c799080b8c580e0 (
plain)
1
2
3
4
5
6
7
8
9
|
require_extension('F');
require_fp;
bool less = f32_lt_quiet(f32(FRS1), f32(FRS2)) ||
(f32_eq(f32(FRS1), f32(FRS2)) && (f32(FRS1).v & F32_SIGN));
if (isNaNF32UI(f32(FRS1).v) && isNaNF32UI(f32(FRS2).v))
WRITE_FRD(f32(defaultNaNF32UI));
else
WRITE_FRD(less || isNaNF32UI(f32(FRS2).v) ? FRS1 : FRS2);
set_fp_exceptions;
|