ENA, Section 1.4, Mentioned, B

Percentage Accurate: 87.8% → 99.6%
Time: 11.0s
Alternatives: 7
Speedup: 1.0×

Specification

?
\[0.999 \leq x \land x \leq 1.001\]
\[\begin{array}{l} \\ \frac{10}{1 - x \cdot x} \end{array} \]
(FPCore (x) :precision binary64 (/ 10.0 (- 1.0 (* x x))))
double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 10.0d0 / (1.0d0 - (x * x))
end function
public static double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
def code(x):
	return 10.0 / (1.0 - (x * x))
function code(x)
	return Float64(10.0 / Float64(1.0 - Float64(x * x)))
end
function tmp = code(x)
	tmp = 10.0 / (1.0 - (x * x));
end
code[x_] := N[(10.0 / N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{10}{1 - x \cdot x}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 7 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 87.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{10}{1 - x \cdot x} \end{array} \]
(FPCore (x) :precision binary64 (/ 10.0 (- 1.0 (* x x))))
double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 10.0d0 / (1.0d0 - (x * x))
end function
public static double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
def code(x):
	return 10.0 / (1.0 - (x * x))
function code(x)
	return Float64(10.0 / Float64(1.0 - Float64(x * x)))
end
function tmp = code(x)
	tmp = 10.0 / (1.0 - (x * x));
end
code[x_] := N[(10.0 / N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{10}{1 - x \cdot x}
\end{array}

Alternative 1: 99.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \frac{-10}{\mathsf{fma}\left(x, x, -1\right)} \end{array} \]
(FPCore (x) :precision binary64 (/ -10.0 (fma x x -1.0)))
double code(double x) {
	return -10.0 / fma(x, x, -1.0);
}
function code(x)
	return Float64(-10.0 / fma(x, x, -1.0))
end
code[x_] := N[(-10.0 / N[(x * x + -1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Step-by-step derivation
    1. sqr-neg87.7%

      \[\leadsto \frac{10}{1 - \color{blue}{\left(-x\right) \cdot \left(-x\right)}} \]
    2. remove-double-neg87.7%

      \[\leadsto \color{blue}{-\left(-\frac{10}{1 - \left(-x\right) \cdot \left(-x\right)}\right)} \]
    3. distribute-neg-frac87.7%

      \[\leadsto -\color{blue}{\frac{-10}{1 - \left(-x\right) \cdot \left(-x\right)}} \]
    4. distribute-frac-neg287.7%

      \[\leadsto \color{blue}{\frac{-10}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    5. metadata-eval87.7%

      \[\leadsto \frac{\color{blue}{-10}}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)} \]
    6. neg-sub087.7%

      \[\leadsto \frac{-10}{\color{blue}{0 - \left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    7. associate--r-87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(0 - 1\right) + \left(-x\right) \cdot \left(-x\right)}} \]
    8. metadata-eval87.7%

      \[\leadsto \frac{-10}{\color{blue}{-1} + \left(-x\right) \cdot \left(-x\right)} \]
    9. +-commutative87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(-x\right) \cdot \left(-x\right) + -1}} \]
    10. sqr-neg87.7%

      \[\leadsto \frac{-10}{\color{blue}{x \cdot x} + -1} \]
    11. fma-define99.5%

      \[\leadsto \frac{-10}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \]
  3. Simplified99.5%

    \[\leadsto \color{blue}{\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 88.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\ \frac{10}{\frac{1}{\frac{1 + t\_0}{1 - x \cdot \left(x \cdot \left(x \cdot \left(x \cdot t\_0\right)\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* x x) (* x x))))
   (/
    10.0
    (*
     (/ 1.0 (/ (+ 1.0 t_0) (- 1.0 (* x (* x (* x (* x t_0)))))))
     (/ 1.0 (+ 1.0 (* x x)))))))
double code(double x) {
	double t_0 = (x * x) * (x * x);
	return 10.0 / ((1.0 / ((1.0 + t_0) / (1.0 - (x * (x * (x * (x * t_0))))))) * (1.0 / (1.0 + (x * x))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    t_0 = (x * x) * (x * x)
    code = 10.0d0 / ((1.0d0 / ((1.0d0 + t_0) / (1.0d0 - (x * (x * (x * (x * t_0))))))) * (1.0d0 / (1.0d0 + (x * x))))
end function
public static double code(double x) {
	double t_0 = (x * x) * (x * x);
	return 10.0 / ((1.0 / ((1.0 + t_0) / (1.0 - (x * (x * (x * (x * t_0))))))) * (1.0 / (1.0 + (x * x))));
}
def code(x):
	t_0 = (x * x) * (x * x)
	return 10.0 / ((1.0 / ((1.0 + t_0) / (1.0 - (x * (x * (x * (x * t_0))))))) * (1.0 / (1.0 + (x * x))))
function code(x)
	t_0 = Float64(Float64(x * x) * Float64(x * x))
	return Float64(10.0 / Float64(Float64(1.0 / Float64(Float64(1.0 + t_0) / Float64(1.0 - Float64(x * Float64(x * Float64(x * Float64(x * t_0))))))) * Float64(1.0 / Float64(1.0 + Float64(x * x)))))
end
function tmp = code(x)
	t_0 = (x * x) * (x * x);
	tmp = 10.0 / ((1.0 / ((1.0 + t_0) / (1.0 - (x * (x * (x * (x * t_0))))))) * (1.0 / (1.0 + (x * x))));
end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(10.0 / N[(N[(1.0 / N[(N[(1.0 + t$95$0), $MachinePrecision] / N[(1.0 - N[(x * N[(x * N[(x * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\
\frac{10}{\frac{1}{\frac{1 + t\_0}{1 - x \cdot \left(x \cdot \left(x \cdot \left(x \cdot t\_0\right)\right)\right)}} \cdot \frac{1}{1 + x \cdot x}}
\end{array}
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. flip--87.6%

      \[\leadsto \frac{10}{\color{blue}{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}} \]
    2. div-inv87.6%

      \[\leadsto \frac{10}{\color{blue}{\left(1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}}} \]
    3. metadata-eval87.6%

      \[\leadsto \frac{10}{\left(\color{blue}{1} - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}} \]
  4. Applied egg-rr87.6%

    \[\leadsto \frac{10}{\color{blue}{\left(1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}}} \]
  5. Step-by-step derivation
    1. flip--87.5%

      \[\leadsto \frac{10}{\color{blue}{\frac{1 \cdot 1 - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    2. clear-num87.5%

      \[\leadsto \frac{10}{\color{blue}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 \cdot 1 - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
    3. metadata-eval87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{\color{blue}{1} - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
  6. Applied egg-rr87.5%

    \[\leadsto \frac{10}{\color{blue}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
  7. Step-by-step derivation
    1. expm1-log1p-u87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    2. expm1-undefine87.2%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)} - 1\right)} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    3. log1p-undefine87.4%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \left(e^{\color{blue}{\log \left(1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} - 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    4. add-exp-log87.4%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \left(\color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)} - 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
  8. Applied egg-rr87.4%

    \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\left(\left(1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) - 1\right)} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
  9. Step-by-step derivation
    1. add-exp-log87.4%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \left(\color{blue}{e^{\log \left(1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} - 1\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    2. expm1-define87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\mathsf{expm1}\left(\log \left(1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    3. log1p-define87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \mathsf{expm1}\left(\color{blue}{\mathsf{log1p}\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    4. add-sqr-sqrt87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\sqrt{\left(x \cdot x\right) \cdot \left(x \cdot x\right)} \cdot \sqrt{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    5. sqrt-prod87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\sqrt{\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    6. associate-*r*87.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)}}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    7. expm1-log1p-u87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\sqrt{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)}} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{1 + x \cdot x}} \]
    8. add-sqr-sqrt87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \sqrt{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)} \cdot \color{blue}{\left(\sqrt{\left(x \cdot x\right) \cdot \left(x \cdot x\right)} \cdot \sqrt{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
    9. sqrt-prod87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \sqrt{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)} \cdot \color{blue}{\sqrt{\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}}}} \cdot \frac{1}{1 + x \cdot x}} \]
    10. associate-*r*87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \sqrt{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)}}}} \cdot \frac{1}{1 + x \cdot x}} \]
    11. add-sqr-sqrt87.5%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
    12. associate-*l*88.3%

      \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
  10. Applied egg-rr88.8%

    \[\leadsto \frac{10}{\frac{1}{\frac{1 + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 - \color{blue}{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)\right)}}} \cdot \frac{1}{1 + x \cdot x}} \]
  11. Add Preprocessing

Alternative 3: 88.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \frac{10}{\frac{1}{1 + x \cdot x} \cdot \left(1 - x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ 10.0 (* (/ 1.0 (+ 1.0 (* x x))) (- 1.0 (* x (* x (* x x)))))))
double code(double x) {
	return 10.0 / ((1.0 / (1.0 + (x * x))) * (1.0 - (x * (x * (x * x)))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 10.0d0 / ((1.0d0 / (1.0d0 + (x * x))) * (1.0d0 - (x * (x * (x * x)))))
end function
public static double code(double x) {
	return 10.0 / ((1.0 / (1.0 + (x * x))) * (1.0 - (x * (x * (x * x)))));
}
def code(x):
	return 10.0 / ((1.0 / (1.0 + (x * x))) * (1.0 - (x * (x * (x * x)))))
function code(x)
	return Float64(10.0 / Float64(Float64(1.0 / Float64(1.0 + Float64(x * x))) * Float64(1.0 - Float64(x * Float64(x * Float64(x * x))))))
end
function tmp = code(x)
	tmp = 10.0 / ((1.0 / (1.0 + (x * x))) * (1.0 - (x * (x * (x * x)))));
end
code[x_] := N[(10.0 / N[(N[(1.0 / N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{10}{\frac{1}{1 + x \cdot x} \cdot \left(1 - x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. flip--87.6%

      \[\leadsto \frac{10}{\color{blue}{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}} \]
    2. div-inv87.6%

      \[\leadsto \frac{10}{\color{blue}{\left(1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}}} \]
    3. metadata-eval87.6%

      \[\leadsto \frac{10}{\left(\color{blue}{1} - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}} \]
  4. Applied egg-rr87.6%

    \[\leadsto \frac{10}{\color{blue}{\left(1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{1 + x \cdot x}}} \]
  5. Step-by-step derivation
    1. associate-*r*88.3%

      \[\leadsto \frac{10}{\left(1 - \color{blue}{\left(\left(x \cdot x\right) \cdot x\right) \cdot x}\right) \cdot \frac{1}{1 + x \cdot x}} \]
    2. associate-*r*88.3%

      \[\leadsto \frac{10}{\left(1 - \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot x\right) \cdot \frac{1}{1 + x \cdot x}} \]
  6. Applied egg-rr88.3%

    \[\leadsto \frac{10}{\left(1 - \color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot x}\right) \cdot \frac{1}{1 + x \cdot x}} \]
  7. Final simplification88.3%

    \[\leadsto \frac{10}{\frac{1}{1 + x \cdot x} \cdot \left(1 - x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)} \]
  8. Add Preprocessing

Alternative 4: 87.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{1}{\frac{1}{-10 \cdot \frac{1}{-1 + x \cdot x}}} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ 1.0 (/ 1.0 (* -10.0 (/ 1.0 (+ -1.0 (* x x)))))))
double code(double x) {
	return 1.0 / (1.0 / (-10.0 * (1.0 / (-1.0 + (x * x)))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 1.0d0 / (1.0d0 / ((-10.0d0) * (1.0d0 / ((-1.0d0) + (x * x)))))
end function
public static double code(double x) {
	return 1.0 / (1.0 / (-10.0 * (1.0 / (-1.0 + (x * x)))));
}
def code(x):
	return 1.0 / (1.0 / (-10.0 * (1.0 / (-1.0 + (x * x)))))
function code(x)
	return Float64(1.0 / Float64(1.0 / Float64(-10.0 * Float64(1.0 / Float64(-1.0 + Float64(x * x))))))
end
function tmp = code(x)
	tmp = 1.0 / (1.0 / (-10.0 * (1.0 / (-1.0 + (x * x)))));
end
code[x_] := N[(1.0 / N[(1.0 / N[(-10.0 * N[(1.0 / N[(-1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\frac{1}{-10 \cdot \frac{1}{-1 + x \cdot x}}}
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Step-by-step derivation
    1. sqr-neg87.7%

      \[\leadsto \frac{10}{1 - \color{blue}{\left(-x\right) \cdot \left(-x\right)}} \]
    2. remove-double-neg87.7%

      \[\leadsto \color{blue}{-\left(-\frac{10}{1 - \left(-x\right) \cdot \left(-x\right)}\right)} \]
    3. distribute-neg-frac87.7%

      \[\leadsto -\color{blue}{\frac{-10}{1 - \left(-x\right) \cdot \left(-x\right)}} \]
    4. distribute-frac-neg287.7%

      \[\leadsto \color{blue}{\frac{-10}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    5. metadata-eval87.7%

      \[\leadsto \frac{\color{blue}{-10}}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)} \]
    6. neg-sub087.7%

      \[\leadsto \frac{-10}{\color{blue}{0 - \left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    7. associate--r-87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(0 - 1\right) + \left(-x\right) \cdot \left(-x\right)}} \]
    8. metadata-eval87.7%

      \[\leadsto \frac{-10}{\color{blue}{-1} + \left(-x\right) \cdot \left(-x\right)} \]
    9. +-commutative87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(-x\right) \cdot \left(-x\right) + -1}} \]
    10. sqr-neg87.7%

      \[\leadsto \frac{-10}{\color{blue}{x \cdot x} + -1} \]
    11. fma-define99.5%

      \[\leadsto \frac{-10}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \]
  3. Simplified99.5%

    \[\leadsto \color{blue}{\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num99.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(x, x, -1\right)}{-10}}} \]
    2. inv-pow99.4%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(x, x, -1\right)}{-10}\right)}^{-1}} \]
    3. add-sqr-sqrt35.6%

      \[\leadsto {\left(\frac{\color{blue}{\sqrt{\mathsf{fma}\left(x, x, -1\right)} \cdot \sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{-10}\right)}^{-1} \]
    4. associate-/l*35.6%

      \[\leadsto {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x, x, -1\right)} \cdot \frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}}^{-1} \]
    5. unpow-prod-down35.7%

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x, x, -1\right)}\right)}^{-1} \cdot {\left(\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}^{-1}} \]
    6. inv-pow35.7%

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}} \cdot {\left(\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}^{-1} \]
    7. pow1/235.7%

      \[\leadsto \frac{1}{\color{blue}{{\left(\mathsf{fma}\left(x, x, -1\right)\right)}^{0.5}}} \cdot {\left(\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}^{-1} \]
    8. fma-undefine31.8%

      \[\leadsto \frac{1}{{\color{blue}{\left(x \cdot x + -1\right)}}^{0.5}} \cdot {\left(\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}^{-1} \]
    9. +-commutative31.8%

      \[\leadsto \frac{1}{{\color{blue}{\left(-1 + x \cdot x\right)}}^{0.5}} \cdot {\left(\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}\right)}^{-1} \]
    10. pow1/231.8%

      \[\leadsto \frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot {\left(\frac{\color{blue}{{\left(\mathsf{fma}\left(x, x, -1\right)\right)}^{0.5}}}{-10}\right)}^{-1} \]
    11. fma-undefine31.3%

      \[\leadsto \frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot {\left(\frac{{\color{blue}{\left(x \cdot x + -1\right)}}^{0.5}}{-10}\right)}^{-1} \]
    12. +-commutative31.3%

      \[\leadsto \frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot {\left(\frac{{\color{blue}{\left(-1 + x \cdot x\right)}}^{0.5}}{-10}\right)}^{-1} \]
  6. Applied egg-rr31.3%

    \[\leadsto \color{blue}{\frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot {\left(\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}\right)}^{-1}} \]
  7. Step-by-step derivation
    1. unpow-131.3%

      \[\leadsto \frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot \color{blue}{\frac{1}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}}} \]
    2. associate-*r/31.3%

      \[\leadsto \color{blue}{\frac{\frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}} \cdot 1}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}}} \]
    3. *-rgt-identity31.3%

      \[\leadsto \frac{\color{blue}{\frac{1}{{\left(-1 + x \cdot x\right)}^{0.5}}}}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}} \]
    4. unpow1/231.3%

      \[\leadsto \frac{\frac{1}{\color{blue}{\sqrt{-1 + x \cdot x}}}}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}} \]
    5. +-commutative31.3%

      \[\leadsto \frac{\frac{1}{\sqrt{\color{blue}{x \cdot x + -1}}}}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}} \]
    6. fma-define31.8%

      \[\leadsto \frac{\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}}}}{\frac{{\left(-1 + x \cdot x\right)}^{0.5}}{-10}} \]
    7. unpow1/231.8%

      \[\leadsto \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\frac{\color{blue}{\sqrt{-1 + x \cdot x}}}{-10}} \]
    8. +-commutative31.8%

      \[\leadsto \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\frac{\sqrt{\color{blue}{x \cdot x + -1}}}{-10}} \]
    9. fma-define35.6%

      \[\leadsto \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\frac{\sqrt{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}}}{-10}} \]
  8. Simplified35.6%

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}}} \]
  9. Step-by-step derivation
    1. clear-num35.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}}{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}}} \]
    2. clear-num35.6%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\frac{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}{-10}}}}} \]
    3. associate-/r/35.6%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}} \cdot -10}}} \]
    4. div-inv35.6%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{\left(\frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)}}\right)} \cdot -10}} \]
    5. frac-times35.6%

      \[\leadsto \frac{1}{\frac{1}{\color{blue}{\frac{1 \cdot 1}{\sqrt{\mathsf{fma}\left(x, x, -1\right)} \cdot \sqrt{\mathsf{fma}\left(x, x, -1\right)}}} \cdot -10}} \]
    6. metadata-eval35.6%

      \[\leadsto \frac{1}{\frac{1}{\frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(x, x, -1\right)} \cdot \sqrt{\mathsf{fma}\left(x, x, -1\right)}} \cdot -10}} \]
    7. add-sqr-sqrt99.3%

      \[\leadsto \frac{1}{\frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \cdot -10}} \]
    8. fma-undefine87.7%

      \[\leadsto \frac{1}{\frac{1}{\frac{1}{\color{blue}{x \cdot x + -1}} \cdot -10}} \]
  10. Applied egg-rr87.7%

    \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{1}{x \cdot x + -1} \cdot -10}}} \]
  11. Final simplification87.7%

    \[\leadsto \frac{1}{\frac{1}{-10 \cdot \frac{1}{-1 + x \cdot x}}} \]
  12. Add Preprocessing

Alternative 5: 13.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 1:\\ \;\;\;\;10\\ \mathbf{else}:\\ \;\;\;\;\frac{-10}{x \cdot x}\\ \end{array} \end{array} \]
(FPCore (x) :precision binary64 (if (<= (* x x) 1.0) 10.0 (/ -10.0 (* x x))))
double code(double x) {
	double tmp;
	if ((x * x) <= 1.0) {
		tmp = 10.0;
	} else {
		tmp = -10.0 / (x * x);
	}
	return tmp;
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: tmp
    if ((x * x) <= 1.0d0) then
        tmp = 10.0d0
    else
        tmp = (-10.0d0) / (x * x)
    end if
    code = tmp
end function
public static double code(double x) {
	double tmp;
	if ((x * x) <= 1.0) {
		tmp = 10.0;
	} else {
		tmp = -10.0 / (x * x);
	}
	return tmp;
}
def code(x):
	tmp = 0
	if (x * x) <= 1.0:
		tmp = 10.0
	else:
		tmp = -10.0 / (x * x)
	return tmp
function code(x)
	tmp = 0.0
	if (Float64(x * x) <= 1.0)
		tmp = 10.0;
	else
		tmp = Float64(-10.0 / Float64(x * x));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if ((x * x) <= 1.0)
		tmp = 10.0;
	else
		tmp = -10.0 / (x * x);
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[N[(x * x), $MachinePrecision], 1.0], 10.0, N[(-10.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 1:\\
\;\;\;\;10\\

\mathbf{else}:\\
\;\;\;\;\frac{-10}{x \cdot x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x x) < 1

    1. Initial program 88.1%

      \[\frac{10}{1 - x \cdot x} \]
    2. Step-by-step derivation
      1. sqr-neg88.1%

        \[\leadsto \frac{10}{1 - \color{blue}{\left(-x\right) \cdot \left(-x\right)}} \]
      2. remove-double-neg88.1%

        \[\leadsto \color{blue}{-\left(-\frac{10}{1 - \left(-x\right) \cdot \left(-x\right)}\right)} \]
      3. distribute-neg-frac88.1%

        \[\leadsto -\color{blue}{\frac{-10}{1 - \left(-x\right) \cdot \left(-x\right)}} \]
      4. distribute-frac-neg288.1%

        \[\leadsto \color{blue}{\frac{-10}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
      5. metadata-eval88.1%

        \[\leadsto \frac{\color{blue}{-10}}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)} \]
      6. neg-sub088.1%

        \[\leadsto \frac{-10}{\color{blue}{0 - \left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
      7. associate--r-88.1%

        \[\leadsto \frac{-10}{\color{blue}{\left(0 - 1\right) + \left(-x\right) \cdot \left(-x\right)}} \]
      8. metadata-eval88.1%

        \[\leadsto \frac{-10}{\color{blue}{-1} + \left(-x\right) \cdot \left(-x\right)} \]
      9. +-commutative88.1%

        \[\leadsto \frac{-10}{\color{blue}{\left(-x\right) \cdot \left(-x\right) + -1}} \]
      10. sqr-neg88.1%

        \[\leadsto \frac{-10}{\color{blue}{x \cdot x} + -1} \]
      11. fma-define99.5%

        \[\leadsto \frac{-10}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 13.5%

      \[\leadsto \color{blue}{10} \]

    if 1 < (*.f64 x x)

    1. Initial program 87.0%

      \[\frac{10}{1 - x \cdot x} \]
    2. Step-by-step derivation
      1. sqr-neg87.0%

        \[\leadsto \frac{10}{1 - \color{blue}{\left(-x\right) \cdot \left(-x\right)}} \]
      2. remove-double-neg87.0%

        \[\leadsto \color{blue}{-\left(-\frac{10}{1 - \left(-x\right) \cdot \left(-x\right)}\right)} \]
      3. distribute-neg-frac87.0%

        \[\leadsto -\color{blue}{\frac{-10}{1 - \left(-x\right) \cdot \left(-x\right)}} \]
      4. distribute-frac-neg287.0%

        \[\leadsto \color{blue}{\frac{-10}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
      5. metadata-eval87.0%

        \[\leadsto \frac{\color{blue}{-10}}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)} \]
      6. neg-sub087.0%

        \[\leadsto \frac{-10}{\color{blue}{0 - \left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
      7. associate--r-87.0%

        \[\leadsto \frac{-10}{\color{blue}{\left(0 - 1\right) + \left(-x\right) \cdot \left(-x\right)}} \]
      8. metadata-eval87.0%

        \[\leadsto \frac{-10}{\color{blue}{-1} + \left(-x\right) \cdot \left(-x\right)} \]
      9. +-commutative87.0%

        \[\leadsto \frac{-10}{\color{blue}{\left(-x\right) \cdot \left(-x\right) + -1}} \]
      10. sqr-neg87.0%

        \[\leadsto \frac{-10}{\color{blue}{x \cdot x} + -1} \]
      11. fma-define99.5%

        \[\leadsto \frac{-10}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 13.5%

      \[\leadsto \color{blue}{\frac{-10}{{x}^{2}}} \]
    6. Step-by-step derivation
      1. unpow213.5%

        \[\leadsto \frac{-10}{\color{blue}{x \cdot x}} \]
    7. Simplified13.5%

      \[\leadsto \color{blue}{\frac{-10}{x \cdot x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 87.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{10}{1 - x \cdot x} \end{array} \]
(FPCore (x) :precision binary64 (/ 10.0 (- 1.0 (* x x))))
double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 10.0d0 / (1.0d0 - (x * x))
end function
public static double code(double x) {
	return 10.0 / (1.0 - (x * x));
}
def code(x):
	return 10.0 / (1.0 - (x * x))
function code(x)
	return Float64(10.0 / Float64(1.0 - Float64(x * x)))
end
function tmp = code(x)
	tmp = 10.0 / (1.0 - (x * x));
end
code[x_] := N[(10.0 / N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{10}{1 - x \cdot x}
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 7: 9.5% accurate, 7.0× speedup?

\[\begin{array}{l} \\ 10 \end{array} \]
(FPCore (x) :precision binary64 10.0)
double code(double x) {
	return 10.0;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 10.0d0
end function
public static double code(double x) {
	return 10.0;
}
def code(x):
	return 10.0
function code(x)
	return 10.0
end
function tmp = code(x)
	tmp = 10.0;
end
code[x_] := 10.0
\begin{array}{l}

\\
10
\end{array}
Derivation
  1. Initial program 87.7%

    \[\frac{10}{1 - x \cdot x} \]
  2. Step-by-step derivation
    1. sqr-neg87.7%

      \[\leadsto \frac{10}{1 - \color{blue}{\left(-x\right) \cdot \left(-x\right)}} \]
    2. remove-double-neg87.7%

      \[\leadsto \color{blue}{-\left(-\frac{10}{1 - \left(-x\right) \cdot \left(-x\right)}\right)} \]
    3. distribute-neg-frac87.7%

      \[\leadsto -\color{blue}{\frac{-10}{1 - \left(-x\right) \cdot \left(-x\right)}} \]
    4. distribute-frac-neg287.7%

      \[\leadsto \color{blue}{\frac{-10}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    5. metadata-eval87.7%

      \[\leadsto \frac{\color{blue}{-10}}{-\left(1 - \left(-x\right) \cdot \left(-x\right)\right)} \]
    6. neg-sub087.7%

      \[\leadsto \frac{-10}{\color{blue}{0 - \left(1 - \left(-x\right) \cdot \left(-x\right)\right)}} \]
    7. associate--r-87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(0 - 1\right) + \left(-x\right) \cdot \left(-x\right)}} \]
    8. metadata-eval87.7%

      \[\leadsto \frac{-10}{\color{blue}{-1} + \left(-x\right) \cdot \left(-x\right)} \]
    9. +-commutative87.7%

      \[\leadsto \frac{-10}{\color{blue}{\left(-x\right) \cdot \left(-x\right) + -1}} \]
    10. sqr-neg87.7%

      \[\leadsto \frac{-10}{\color{blue}{x \cdot x} + -1} \]
    11. fma-define99.5%

      \[\leadsto \frac{-10}{\color{blue}{\mathsf{fma}\left(x, x, -1\right)}} \]
  3. Simplified99.5%

    \[\leadsto \color{blue}{\frac{-10}{\mathsf{fma}\left(x, x, -1\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 9.2%

    \[\leadsto \color{blue}{10} \]
  6. Add Preprocessing

Reproduce

?
herbie shell --seed 2024097 
(FPCore (x)
  :name "ENA, Section 1.4, Mentioned, B"
  :precision binary64
  :pre (and (<= 0.999 x) (<= x 1.001))
  (/ 10.0 (- 1.0 (* x x))))