-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
I found a use case where the rounding error in float32 is ~1.3e-3, compared to ~1.3e-4 of NumPy.
import numpy as np
from blis import dotv
A64 = np.full((95, ), fill_value=40.09845, dtype=np.float64)
A64[0] = 0.0
B64 = np.full((95, ), fill_value=2.0, dtype=np.float64)
B64[1] = -98.0
B64[2] = -86.0
A32 = A64.astype(np.float32)
B32 = B64.astype(np.float32)
np_f64 = A64.dot(B64) # np.float64(0.0)
blis_f64 = dotv(A64, B64) # 0.0
np_f32 = A32.dot(B32) # np.float32(-0.00012207031)
blis_f32 = dotv(A32, B32) # -0.001220703125Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels