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

Re: [guile-lib] PATCH: fix primes.scm

2025-02-16 Thread Maxim Cournoyer
Hello Zack, "Zack Weinberg" writes: > primes.scm appears never to have been updated for the new bitvector API > (in Guile 3?), causing both build and test failures. > The appended patch (vs 0.2.8.1) fixes the failures I am seeing. > Assuming this is indeed an API change in Guile 3, I do not kno

Re: Texinfo in Guile Scheme docstrings?

2025-02-16 Thread Maxim Cournoyer
Hi Yuval, Yuval Langer writes: > Hi, > > I am writing docstrings to guile-srfi-189 currently[1] and looking for > good docstring style practices (that's another topic for another > thread). > > I have noticed that there are some modules with Texinfo markup in > their docstrings, but I haven't fo

Re: guile-lib: Fix typo in license declaration.

2025-02-16 Thread Maxim Cournoyer
Hi Vagrant! Vagrant Cascadian writes: > Attached is a patch which fixes a minor typo in the license declaration. > > Thanks for developing guile-lib! Fix pushed to the master branch, as commit c09d63e. Thanks! -- Maxim

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
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.

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

2025-02-16 Thread Adam Faiz
This revised patch documents the limitations of this module and adds more unit tests. I've also changed the functions to short-circuit only results that are rational, since the exactness property is already lost in any case when the square roots are irrational. >From 5eb3be7ce0781068d8e0030c4e5

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

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

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 θ/π

[PATCH v1] src: (math trigonometry): Add it.

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

Re: Guilr-Lib - New maintainer

2025-02-16 Thread Maxim Cournoyer
Hi Alex, Alex Sassmannshausen writes: > Congratulations Maxim, you will definitely be a great maintainer! > > Thank you David for your work on Guile-lib. It's a library that I've > come to use more and more as time has gone on! Belated thank you :-) I'll screen the guile-devel messages more cl

Re: Texinfo in Guile Scheme docstrings?

2025-02-16 Thread Tomas Volf
Maxim Cournoyer writes: > Hi Yuval, > > Yuval Langer writes: > >> Hi, >> >> I am writing docstrings to guile-srfi-189 currently[1] and looking for >> good docstring style practices (that's another topic for another >> thread). >> >> I have noticed that there are some modules with Texinfo markup

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: Texinfo in Guile Scheme docstrings?

2025-02-16 Thread Matt Wette
On 2/16/25 6:48 AM, Maxim Cournoyer wrote: Hi Yuval, Yuval Langer writes: Hi, I am writing docstrings to guile-srfi-189 currently[1] and looking for good docstring style practices (that's another topic for another thread). I have noticed that there are some modu

Re: [guile-lib] PATCH: fix primes.scm

2025-02-16 Thread Zack Weinberg
On Sun, Feb 16, 2025, at 10:22 AM, Maxim Cournoyer wrote: >> primes.scm appears never to have been updated for the new bitvector API >> (in Guile 3?), causing both build and test failures. >> The appended patch (vs 0.2.8.1) fixes the failures I am seeing. > > Just to make sure, you are seeing these