Skip to main content

Module x87

Module x87 

Source

Functions§

atan2
fpatan: atan2(y, x) on the x87 unit, rounded once to double (the precision control does not apply to fpatan) [pathdata.s pd_atan2, dash.s dc_atan2]
cos
fx_cos: fcos (|x| < 2^62) [fx_lut.s fx_cos]
exp2
fx_exp2: 2^x (frndint / f2xm1 / fscale) [fx_lut.s fx_exp2]
log2
fx_log2: log2 x (fld1 / fyl2x; x <= 0: -inf / NaN as the FPU delivers) [fx_lut.s fx_log2]
log10_round
fldlg2 / fyl2x / fistp: log10 v rounded to the nearest integer [f64_format]
pow
fx_pow: x^y – NaN when x or y is NaN, 1 for y == 0, 0 for x <= 0, x for y == 1, else 2^(y log2 x) on the x87 unit with 64-bit precision and round to nearest (fyl2x, then frndint / f2xm1 / fscale), rounded once to double [fx_lut.s fx_pow]
rz_exp2
2^x as rz_exp2 computes it (|x| < 2^30): i = cvtsd2si x, f = x - i (SSE), then on the x87 unit f2xm1 f, + 1 (faddp: rounded by the process’s precision control, as in the assembly), fscale by i, rounded to double [PaintCraft dlg_rotzoom.s rz_exp2]
rz_log2
fyl2x with y = 1: log2(x) on the x87 unit, rounded once to double (fyl2x is not subject to the precision control) [PaintCraft dlg_rotzoom.s rz_log2]
scale
m * 10^e or m / 10^-e (m < 2^63), rounded once to double [f64_parse .fp_calc]
scale_round
frndint(v * 10^k) or frndint(v / 10^-k) as a 64-bit integer [f64_format .ff_scale]
sin
fx_sin: fsin (|x| < 2^62) [fx_lut.s fx_sin]
sincos
fsincos: (cos x, sin x) on the x87 unit, each rounded once to double (the precision control does not apply to fsincos) [ui_value.s deg_sincos]