diff --git a/src/vector-examples.adoc b/src/vector-examples.adoc index 9e54acd7a..4577c9216 100644 --- a/src/vector-examples.adoc +++ b/src/vector-examples.adoc @@ -82,13 +82,13 @@ include::example/sgemm.S[lines=4..-1] # v1 = v1 / v2 to almost 23 bits of precision. vfrec7.v v3, v2 # Estimate 1/v2 - li t0, 0x40000000 -vmv.v.x v4, t0 # Splat 2.0 -vfnmsac.vv v4, v2, v3 # 2.0 - v2 * est(1/v2) -vfmul.vv v3, v3, v4 # Better estimate of 1/v2 -vmv.v.x v4, t0 # Splat 2.0 -vfnmsac.vv v4, v2, v3 # 2.0 - v2 * est(1/v2) -vfmul.vv v3, v3, v4 # Better estimate of 1/v2 + li t0, 0x3f800000 +vmv.v.x v4, t0 # Splat 1.0 +vfnmsac.vv v4, v2, v3 # 1.0 - v2 * est(1/v2) +vfmadd.vv v3, v4, v3 # Better estimate of 1/v2 +vmv.v.x v4, t0 # Splat 1.0 +vfnmsac.vv v4, v2, v3 # 1.0 - v2 * est(1/v2) +vfmadd.vv v3, v4, v3 # Better estimate of 1/v2 vfmul.vv v1, v1, v3 # Estimate of v1/v2 ----