cordic_calc_iq(9)
π cordic_calc_iq β the kernel API manual, bestie edition π
okay so you're in the cordic part of the kernel API docs (man section 9, kernel devs only, iykyk β¨) and you found cordic_calc_iq. slay. let's get into it π
πΈ NAME πΈ
cordic_calc_iq β calculates the i/q coordinate for given angle. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
struct cordic_iq cordic_calc_iq (s32 theta );
literally one argument, one struct back. no cap, it's giving minimal and iconic π¦
π§ ARGUMENTS π§
thetaβ the angle, in degrees, that you want the i/q coordinate calculated for. that's the number you hand over, and it wants degrees, not radians, don't come at it with radians π
π₯ DESCRIPTION π₯
so this function calculates the i/q coordinate for a given angle using the CORDIC algorithm. yes, the classic one, we love a legend π
the coordinate it gives you is made of two parts, bestie:
- the real (i) part
- the imaginary (q) part
and the way it works out is genuinely kind of beautiful: the real part is essentially the cosine of the angle, and the imaginary part is the sine of the angle. cos and sin, doing their main character thing π
one thing to remember though β the returned values are scaled by 2^16 for precision. so don't just read them raw and expect a clean Β±1, okay? scale it back, king π
as for theta, the range is -180 degrees to +180 degrees. anything you pass outside that range? it gets converted before doing the actual calculation β so it's handled, it's fine, nobody's gonna yell at you π«Ά
π SEE ALSO π
- Kernel file
./include/linux/cordic.h struct cordic_iq(9)
and that's the whole page, bestie, you ate it up fr fr π₯
that's the docs straight out of the kernel source tree at ./include/linux, all dated October 2026 β the version/source line of this very page, now living rent free in your brain ππ§π
periodt. go calculate some coordinates π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms