[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 1/2] For numpy, use longdouble rather than float128
From: |
Sanjeev Gupta |
Subject: |
[gpsd-dev] [PATCH 1/2] For numpy, use longdouble rather than float128 |
Date: |
Wed, 6 Feb 2019 01:19:38 +0800 |
On 32-bit machines, float128 may not be defined.
Additionally, there is no guarantee that float96
or float128, etc, will be defined or available on _any_
architecture. The float128 and float96 exports are,
at best, 80-bit represenations with 48 and 16 bits of
padding. longdouble is portable.
---
contrib/ntpshmviz | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/ntpshmviz b/contrib/ntpshmviz
index c0b32d79..684798f2 100755
--- a/contrib/ntpshmviz
+++ b/contrib/ntpshmviz
@@ -93,8 +93,8 @@ class ntpOffset(object):
line = line.lstrip()
record = line.split(' ')
try:
- offset = (numpy.float128(record[3]) -
- numpy.float128(record[4]))
+ offset = (numpy.longdouble(record[3]) -
+ numpy.longdouble(record[4]))
except:
print ("Invalid data: ", sys.exc_info()[0],
". Data was: ", line)
--
2.20.1
- [gpsd-dev] [PATCH 1/2] For numpy, use longdouble rather than float128,
Sanjeev Gupta <=