aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/math/all_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/all_test.go b/src/math/all_test.go
index e9621e6dc9..1ac9d71a25 100644
--- a/src/math/all_test.go
+++ b/src/math/all_test.go
@@ -3053,12 +3053,18 @@ func TestYn(t *testing.T) {
}
}
+var PortableFMA = FMA // hide call from compiler intrinsic; falls back to portable code
+
func TestFMA(t *testing.T) {
for _, c := range fmaC {
got := FMA(c.x, c.y, c.z)
if !alike(got, c.want) {
t.Errorf("FMA(%g,%g,%g) == %g; want %g", c.x, c.y, c.z, got, c.want)
}
+ got = PortableFMA(c.x, c.y, c.z)
+ if !alike(got, c.want) {
+ t.Errorf("PortableFMA(%g,%g,%g) == %g; want %g", c.x, c.y, c.z, got, c.want)
+ }
}
}