diff mbox series

[bug#60075,09/58] gnu: Add julia-irrationalconstants.

Message ID 55d2e26cfa2ab7bf4998b303f5b7a69b05eb93d3.1671049573.git.efraim@flashner.co.il
State New
Headers show
Series New julia patches | expand

Commit Message

Efraim Flashner Dec. 14, 2022, 8:35 p.m. UTC
* gnu/packages/julia-xyz.scm (julia-irrationalconstants): New variable.
---
 gnu/packages/julia-xyz.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Simon Tournier Dec. 19, 2022, 6:11 p.m. UTC | #1
Hi,

On Wed, 14 Dec 2022 at 22:35, Efraim Flashner <efraim@flashner.co.il> wrote:
> * gnu/packages/julia-xyz.scm (julia-irrationalconstants): New variable.

[...]

> +    (description "This package defines the following irrational constants in Julia.")

This description looks incomplete.  I suggest to replace by:

--8<---------------cut here---------------start------------->8---
This package defines more irrational constants in Julia.
--8<---------------cut here---------------end--------------->8---

or by:

--8<---------------cut here---------------start------------->8---
+      (description "This package provides these irrational constants:
+@itemize
+@item
+@item twoπ       = 2π
+@item fourπ      = 4π
+@item halfπ      = π / 2
+@item quartπ     = π / 4
+@item invπ       = 1 / π
+@item twoinvπ    = 2 / π
+@item fourinvπ   = 4 / π
+@item inv2π      = 1 / (2π)
+@item inv4π      = 1 / (4π)
+@item sqrt2      = √2
+@item sqrt3      = √3
+@item sqrtπ      = √π
+@item sqrt2π     = √2π
+@item sqrt4π     = √4π
+@item sqrthalfπ  = √(π / 2)
+@item invsqrt2   = 1 / √2
+@item invsqrtπ   = 1 / √π
+@item invsqrt2π  = 1 / √2π
+@item loghalf    = log(1 / 2)
+@item logtwo     = log(2)
+@item logten     = log(10)
+@item logπ       = log(π)
+@item log2π      = log(2π)
+@item log4π      = log(4π)
+@end itemize")
--8<---------------cut here---------------end--------------->8---

With a preference for the latter.

Cheers,
simon
Efraim Flashner Dec. 21, 2022, 5:09 p.m. UTC | #2
On Mon, Dec 19, 2022 at 07:11:32PM +0100, zimoun wrote:
> Hi,
> 
> On Wed, 14 Dec 2022 at 22:35, Efraim Flashner <efraim@flashner.co.il> wrote:
> > * gnu/packages/julia-xyz.scm (julia-irrationalconstants): New variable.
> 
> [...]
> 
> > +    (description "This package defines the following irrational constants in Julia.")
> 
> This description looks incomplete.  I suggest to replace by:
> 
> --8<---------------cut here---------------start------------->8---
> This package defines more irrational constants in Julia.
> --8<---------------cut here---------------end--------------->8---
> 
> or by:
> 
> --8<---------------cut here---------------start------------->8---
> +      (description "This package provides these irrational constants:
> +@itemize
> +@item
> +@item twoπ       = 2π
> +@item fourπ      = 4π
> +@item halfπ      = π / 2
> +@item quartπ     = π / 4
> +@item invπ       = 1 / π
> +@item twoinvπ    = 2 / π
> +@item fourinvπ   = 4 / π
> +@item inv2π      = 1 / (2π)
> +@item inv4π      = 1 / (4π)
> +@item sqrt2      = √2
> +@item sqrt3      = √3
> +@item sqrtπ      = √π
> +@item sqrt2π     = √2π
> +@item sqrt4π     = √4π
> +@item sqrthalfπ  = √(π / 2)
> +@item invsqrt2   = 1 / √2
> +@item invsqrtπ   = 1 / √π
> +@item invsqrt2π  = 1 / √2π
> +@item loghalf    = log(1 / 2)
> +@item logtwo     = log(2)
> +@item logten     = log(10)
> +@item logπ       = log(π)
> +@item log2π      = log(2π)
> +@item log4π      = log(4π)
> +@end itemize")
> --8<---------------cut here---------------end--------------->8---
> 
> With a preference for the latter.

I'd argue that the original doesn't just look incomplete, it's not a
full sentence. I've gone with the second.
diff mbox series

Patch

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 845e71f0f2..33856fcf32 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -3104,6 +3104,25 @@  (define-public julia-iocapture
 as a string together with the return value.")
     (license license:expat)))
 
+(define-public julia-irrationalconstants
+  (package
+    (name "julia-irrationalconstants")
+    (version "0.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaMath/IrrationalConstants.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1a007iyh26x67a1bj6fcz7pfxa43kn2v7jpmnz727jkk3xgppg2s"))))
+    (build-system julia-build-system)
+    (home-page "https://github.com/JuliaMath/IrrationalConstants.jl")
+    (synopsis "Additional irrationals for Julia")
+    (description "This package defines the following irrational constants in Julia.")
+    (license license:expat)))
+
 (define-public julia-irtools
   (package
     (name "julia-irtools")