fixp_sin32_rad(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐ŸŒธ NAME ๐ŸŒธ

fixp_sin32_rad โ€” calculates the sin of an angle in radians ๐Ÿ’ซ

Okay so this is the Kernel API Manual page for it, bestie โ€” welcome to the math corner ๐Ÿงฎโœจ


โœจ SYNOPSIS โœจ

s32 fixp_sin32_rad (u32 radians , u32 twopi );

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • radians โ€” the angle, in radians ๐Ÿ“
  • twopi โ€” the value to be used for 2*pi ๐ŸŒ€

๐Ÿ’… DESCRIPTION ๐Ÿ’…

So this function provides a variant for the cases where just 360 values is not enough. It uses linear interpolation to a wider range of values given by the twopi var โ€” lowkey iconic behavior, fr fr โœจ

Experimental tests gave a maximum difference of 0.000038 between the value calculated by sin and the one produced by this function, when twopi is equal to 360000. That seems to be enough precision for practical purposes ๐Ÿ‘‘๐Ÿ’–

Please notice: two high numbers for twopi could cause overflows, so the routine will not allow values of twopi bigger than 1^18 โš ๏ธ๐Ÿ’€

Itโ€™s giving โ€œprecise enough but donโ€™t push your luck,โ€ no cap ๐Ÿซถ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


Byeee bestie ๐Ÿ’– โ€” source/version is ./include/linux, dated October 2026 ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from