Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
On 16/02/2025 12:19, Maxime Devos wrote: I'm going to look into what's the case for 'tan'. For 'tan', tan(pi/4)=tan(45°) is rational as well - I'm going to look into whether the 'S' of 'tan' is only the integer multiples pi/4, or whether there are more. It's only those: For which θ is θ/π

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread tomas
On Sun, Feb 16, 2025 at 12:26:48PM +0100, Maxime Devos wrote: > > On 16/02/2025 11:31, Maxime Devos wrote: > > > > Some others you can add: > > > > * tangent > > * arcsine > > * arccosine > > * arctan > > > One more thing: arctan2. Can be implemented in terms of arctan, but getting > the sign r

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
On 16/02/2025 11:31, Maxime Devos wrote: Some others you can add: * tangent * arcsine * arccosine * arctan One more thing: arctan2. Can be implemented in terms of arctan, but getting the sign right is inconvenient.

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
I'm going to look into what's the case for 'tan'. For 'tan', tan(pi/4)=tan(45°) is rational as well - I'm going to look into whether the 'S' of 'tan' is only the integer multiples pi/4, or whether there are more. It's only those: For which θ is θ/π and tan(θ) rational? Assume t=tan(θ)∈ℚ. Not

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
+;;; Commentary: +;; +;; @cindex normalise angle +;; @cindex sine +;; @cindex cosine +;; @cindex angle, normalised +;; @cindex angle, sine of +;; @cindex angle, cosine of Some others you can add: * tangent * arcsine * arccosine * arctan Those can be quite convenient as well. +;; This module

[PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-15 Thread Adam Faiz
>From ec018be621989234e3c570213084fe8705786e4c Mon Sep 17 00:00:00 2001 From: AwesomeAdam54321 Date: Sun, 16 Feb 2025 12:47:18 +0800 Subject: [PATCH] src: (math trigonometry): Add it. * src/math/trigonometry.scm: New file. * doc/guile-library.scm: Document it in the manual. * unit-tests/math.trig