Commit 45740128 authored by Martin Reinecke's avatar Martin Reinecke

add long double tests

parent ac09e78b
......@@ -18,6 +18,8 @@ def _l2error(a,b):
def test1D(len):
a=np.random.rand(len)-0.5 + 1j*np.random.rand(len)-0.5j
b=a.astype(np.complex64)
c=a.astype(np.complex256)
assert(_l2error(a, pypocketfft.ifftn(pypocketfft.fftn(c))*np.float128(1.)/len)<1e-18)
assert(_l2error(a, pypocketfft.ifftn(pypocketfft.fftn(a),fct=1./len))<1.5e-15)
assert(_l2error(a.real, pypocketfft.irfftn(pypocketfft.rfftn(a.real),fct=1./len,lastsize=len))<1.5e-15)
tmp=a.copy()
......
Markdown is supported
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