Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hypertiling
hypertiling
Commits
67db9cba
Commit
67db9cba
authored
May 24, 2022
by
Florian Goth
Browse files
other indentation\?
parent
9fe0670b
Pipeline
#15339
passed with stages
in 15 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
hypertiling/transformation.py
View file @
67db9cba
...
...
@@ -2,21 +2,22 @@ import math
from
numpy
import
array
as
nparray
def
ddkahan
(
x
,
y
):
'''Transform the addition of two floating point numbers:
"""
Transform the addition of two floating point numbers:
.. math::
x + y = r + e
(Dekker1971) showed that this transform is exact, if abs(x) > abs(y).
(Dekker1971) showed that this transform is exact, if abs(x) > abs(y).
Parameters:
x (float): a floating point number.
y (float): a floating point number with abs(y) < abs(x).
Parameters:
x (float): a floating point number.
y (float): a floating point number with abs(y) < abs(x).
Returns:
r (float): x + y
e (float): the overflow
'''
Returns:
r (float): x + y
e (float): the overflow
"""
r
=
x
+
y
e
=
y
-
(
r
-
x
)
return
r
,
e
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment