4 ms·
My first experience with "Use the source Luke" was wondering as a young lad how computers calculated trig functions. This led me to the Unix V7 math lib source
by dboreham 4y ago
My first experience with "Use the source Luke" was wondering as a young lad how computers calculated trig functions. This led me to the Unix V7 math lib source code[1], and thence to a book by Hart & Cheney which by luck my university library had on the shelf. Good times.
[1] https://github.com/v7unix/v7unix/blob/master/v7/usr/src/libm/sin.c https://github.com/v7unix/v7unix/blob/master/v7/usr/src/libm...
- abudabi123 4y agoA like minded reader may want to have a look at the Go lang. math standard library source. * https://pkg.go.dev/math https://pkg.go.dev/math
- cnity 4y agoWhat are the functions P and Q defined here? https://cs.opensource.google/go/go/+/refs/tags/go1.20.2:src/math/sin.go;l=63 https://cs.opensource.google/go/go/+/refs/tags/go1.20.2:src/...
- hurrrrrrrr 4y agoPolynomials with the coefficients defined in the sin and cos arrays (and likely in the referenced literature).
- chubot 4y agoWoah why do they have s390x assembly versions of everything? https://cs.opensource.google/go/go/+/refs/tags/go1.20.2:src/math/exp_s390x.s https://cs.opensource.google/go/go/+/refs/tags/go1.20.2:src/... That's for a mainframe?