Commit 67db9cba authored by Florian Goth's avatar Florian Goth
Browse files

other indentation\?

parent 9fe0670b
Pipeline #15339 passed with stages
in 15 minutes and 22 seconds
...@@ -2,21 +2,22 @@ import math ...@@ -2,21 +2,22 @@ import math
from numpy import array as nparray from numpy import array as nparray
def ddkahan(x, y): def ddkahan(x, y):
'''Transform the addition of two floating point numbers: """
Transform the addition of two floating point numbers:
.. math:: .. math::
x + y = r + e 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: Parameters:
x (float): a floating point number. x (float): a floating point number.
y (float): a floating point number with abs(y) < abs(x). y (float): a floating point number with abs(y) < abs(x).
Returns: Returns:
r (float): x + y r (float): x + y
e (float): the overflow e (float): the overflow
''' """
r = x + y r = x + y
e = y - (r - x) e = y - (r - x)
return r, e return r, e
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment