gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master fbee79d5: Library (type.c): corrected typo in


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master fbee79d5: Library (type.c): corrected typo in comments
Date: Thu, 2 Jun 2022 19:29:12 -0400 (EDT)

branch: master
commit fbee79d5f1dc545a0c536ca84cdb6969c48578ce
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Library (type.c): corrected typo in comments
    
    Until now, in the previous commit, I had simply used `~` before the numbers
    to signify that the scientific notation is approximate. In the process, I
    had forgot to put a '-' (negative sign) before the minimum 64-bit signed
    integer value. Also, in Commit d413546d0, we had forgot to add a notice for
    fixing bug #62563 in the 'NEWS' file!
    
    With this commit, to avoid confusing '~' with '-', 'almost' is used
    instead, and the minimum value now correctly has a '-'. Also, the NEWS file
    has been updated with a notice of the bug fix.
---
 NEWS       | 2 ++
 lib/type.c | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 9f11cdbc..c95e9cdd 100644
--- a/NEWS
+++ b/NEWS
@@ -93,6 +93,8 @@ See the end of the file for license conditions.
   bug #62548: Table doesn't recognize plain-text string column when defined
               width is larger and it is the last column. Found with the
               help of Sepideh Eskandarlou.
+  bug #62563: Some checks of installed scripts get skipped on macOS. Found
+              and fixed by Raul Infante-Sainz.
   bug #62564: Arithmetic not parsing numbers in scientific notation (for
               example '1e5'). Found by Elham Saremi.
 
diff --git a/lib/type.c b/lib/type.c
index 49186311..25563a7e 100644
--- a/lib/type.c
+++ b/lib/type.c
@@ -585,10 +585,10 @@ gal_type_string_to_number(char *string, uint8_t *type)
   /* Read the number as an integer if 1) we aren't in forced-float mode, 2)
      the number is actually an integer ('ceil(d)==d'), and 3) the number
      fits within interger limits: the maximum value of an unsigned 64-bit
-     integer is ~1.8e19, and the minimum value of a signed 64-bit integer
-     is ~9.2e-18), see the "Numeric data types" section of Gnuastro's
-     book. */
-  if( forcedfloat==0 && ceil(d) == d && d<1.8e19f && d>-1.8e19f )
+     integer is almost 1.8e19, and the minimum value of a signed 64-bit
+     integer is almost -9.2e18), see the "Numeric data types" section of
+     Gnuastro's book. */
+  if( forcedfloat==0 && ceil(d) == d && d<1.8e19f && d>-9.2e18f )
     {
       /* We know the number is an integer, so we should re-read it again,
          but this time, as an integer, because: 1) floating point numbers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]