Hacker News new | ask | show | jobs
by jxy 829 days ago
It's much clearer if you read one of the source code of the libm.

Plan 9: https://9p.io/sources/plan9/sys/src/libc/port/sin.c

Freebsd: https://cgit.freebsd.org/src/tree/lib/msun/src/k_sin.c

3 comments

FreeBSD code is missing the range reduction step (it's named a "kernel" for the reason): https://cgit.freebsd.org/src/tree/lib/msun/src/e_rem_pio2.c
Ah, I always referred to the musl implmenetation, but I just now realized that they copied the Freebsd one.
it says "Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved."

and the directory name is literally: `msun`

Does 9front keep the same sin.c implementation?