SINPI(3)
✨ SINPI(3) ✨
okay so this one is from the Library Functions Manual, and it's all about the half–cycle sine functions sinpi, sinpif, and sinpil 💖 buckle up bestie, it's cuter than regular sine, no cap.
🌸 NAME 🌸
sinpi, sinpif, sinpil — half–cycle sine functions
🎀 LIBRARY 🎀
Math Library (libm, -lm) — yes you gotta link -lm, that's just the vibe.
🦋 SYNOPSIS 🦋
#include <math.h>
double
sinpi(double x);
float
sinpif(float x);
long double
sinpil(long double x);
three flavours, same energy: double, float, and the long boi long double 💅
💫 DESCRIPTION 💫
so the sinpi(), sinpif(), and sinpil() functions compute the sine of π × x. and — this is the iconic part — they measure angles in half-cycles ✨ like, the whole point is that you hand it x and it's doing the π multiply for you internally. slay.
🔥 RETURN VALUES 🔥
the sinpi(), sinpif(), and sinpil() functions returns sin(π × x) 🫶
⚠️ but listen: if|x| ≥ 2^(p - 1)wherepis the floating–point precision ofx, then the returned value is ±0 and it has no significance. like, none. zero meaning, literally ±0. don't come for it 😭
👑 SPECIAL VALUES 👑
the glow-up table, keep it in your notes bestie:
sinpi(±0)— returns ±0. cute, symmetric, we love.sinpi(±n)— returns ±0 for positive integersn. periodt.sinpi(±∞)— return anNaNand raises anFE_INVALIDexception 💀 infinity does not get a sine today.sinpi(NaN)— return anNaNand raises anFE_INVALIDexception 🙈 NaN in, NaN out, exception served.
🌈 SEE ALSO 🌈
cos(3), cospi(3), fenv(3), math(3), sin(3), tan(3), tanpi(3) — go read the whole friend group iykyk 🧚
💜 AUTHORS 💜
The half–cycle trignometric functions were written by Steven G. Kargl <kargl@FreeBSD.org>. thank you king 👑🫶
⭐ STANDARDS ⭐
These functions conform to , to ISO/IEC TS 18661-4, "Information technology — Programming languages, their environments, and system software interfaces — Floating–point extensions for C" — Part 4: Supplementary functions, and to . 💅 (yes, the blanks are literally in the page, not me being mysterious ✨)
🍓 and that's the whole page, bestie! this one's from Debian, dated November 16, 2025, and it's SINPI(3) all the way down. go forth and compute your half-cycles 💖🎀
📦 where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2017 Steven G. Kargl <kargl@FreeBSD.org>
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms