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
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
......
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