?

Average Error: 20.5 → 13.0
Time: 9.4s
Precision: binary32
Cost: 30056

?

\[\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right) \]
\[\begin{array}{l} t_0 := 1 + \left|x\right|\\ t_1 := 0.5 \cdot \frac{1}{x}\\ t_2 := 0.125 \cdot \frac{1}{{x}^{3}}\\ \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(t_2 + \left(\left(-x\right) - \left(t_1 + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log t_0 + \left(\left(3 \cdot \frac{1}{t_0} + 3 \cdot \frac{1}{{t_0}^{2}}\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{t_0}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(t_1 + \left(\left|x\right| + x\right)\right) - t_2\right), x\right)\\ \end{array} \]
(FPCore (x)
 :precision binary32
 (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x))
(FPCore (x)
 :precision binary32
 (let* ((t_0 (+ 1.0 (fabs x)))
        (t_1 (* 0.5 (/ 1.0 x)))
        (t_2 (* 0.125 (/ 1.0 (pow x 3.0)))))
   (if (<= x -0.5)
     (copysign
      (log
       (+ (fabs x) (+ t_2 (- (- x) (+ t_1 (* 0.0625 (/ 1.0 (pow x 5.0))))))))
      x)
     (if (<= x 0.019999999552965164)
       (copysign
        (+
         (log t_0)
         (+
          (*
           (+ (* 3.0 (/ 1.0 t_0)) (* 3.0 (/ 1.0 (pow t_0 2.0))))
           (* -0.041666666666666664 (pow x 4.0)))
          (* 0.5 (/ (pow x 2.0) t_0))))
        x)
       (copysign (log (- (+ t_1 (+ (fabs x) x)) t_2)) x)))))
float code(float x) {
	return copysignf(logf((fabsf(x) + sqrtf(((x * x) + 1.0f)))), x);
}
float code(float x) {
	float t_0 = 1.0f + fabsf(x);
	float t_1 = 0.5f * (1.0f / x);
	float t_2 = 0.125f * (1.0f / powf(x, 3.0f));
	float tmp;
	if (x <= -0.5f) {
		tmp = copysignf(logf((fabsf(x) + (t_2 + (-x - (t_1 + (0.0625f * (1.0f / powf(x, 5.0f)))))))), x);
	} else if (x <= 0.019999999552965164f) {
		tmp = copysignf((logf(t_0) + ((((3.0f * (1.0f / t_0)) + (3.0f * (1.0f / powf(t_0, 2.0f)))) * (-0.041666666666666664f * powf(x, 4.0f))) + (0.5f * (powf(x, 2.0f) / t_0)))), x);
	} else {
		tmp = copysignf(logf(((t_1 + (fabsf(x) + x)) - t_2)), x);
	}
	return tmp;
}
function code(x)
	return copysign(log(Float32(abs(x) + sqrt(Float32(Float32(x * x) + Float32(1.0))))), x)
end
function code(x)
	t_0 = Float32(Float32(1.0) + abs(x))
	t_1 = Float32(Float32(0.5) * Float32(Float32(1.0) / x))
	t_2 = Float32(Float32(0.125) * Float32(Float32(1.0) / (x ^ Float32(3.0))))
	tmp = Float32(0.0)
	if (x <= Float32(-0.5))
		tmp = copysign(log(Float32(abs(x) + Float32(t_2 + Float32(Float32(-x) - Float32(t_1 + Float32(Float32(0.0625) * Float32(Float32(1.0) / (x ^ Float32(5.0))))))))), x);
	elseif (x <= Float32(0.019999999552965164))
		tmp = copysign(Float32(log(t_0) + Float32(Float32(Float32(Float32(Float32(3.0) * Float32(Float32(1.0) / t_0)) + Float32(Float32(3.0) * Float32(Float32(1.0) / (t_0 ^ Float32(2.0))))) * Float32(Float32(-0.041666666666666664) * (x ^ Float32(4.0)))) + Float32(Float32(0.5) * Float32((x ^ Float32(2.0)) / t_0)))), x);
	else
		tmp = copysign(log(Float32(Float32(t_1 + Float32(abs(x) + x)) - t_2)), x);
	end
	return tmp
end
function tmp = code(x)
	tmp = sign(x) * abs(log((abs(x) + sqrt(((x * x) + single(1.0))))));
end
function tmp_2 = code(x)
	t_0 = single(1.0) + abs(x);
	t_1 = single(0.5) * (single(1.0) / x);
	t_2 = single(0.125) * (single(1.0) / (x ^ single(3.0)));
	tmp = single(0.0);
	if (x <= single(-0.5))
		tmp = sign(x) * abs(log((abs(x) + (t_2 + (-x - (t_1 + (single(0.0625) * (single(1.0) / (x ^ single(5.0))))))))));
	elseif (x <= single(0.019999999552965164))
		tmp = sign(x) * abs((log(t_0) + ((((single(3.0) * (single(1.0) / t_0)) + (single(3.0) * (single(1.0) / (t_0 ^ single(2.0))))) * (single(-0.041666666666666664) * (x ^ single(4.0)))) + (single(0.5) * ((x ^ single(2.0)) / t_0)))));
	else
		tmp = sign(x) * abs(log(((t_1 + (abs(x) + x)) - t_2)));
	end
	tmp_2 = tmp;
end
\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)
\begin{array}{l}
t_0 := 1 + \left|x\right|\\
t_1 := 0.5 \cdot \frac{1}{x}\\
t_2 := 0.125 \cdot \frac{1}{{x}^{3}}\\
\mathbf{if}\;x \leq -0.5:\\
\;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(t_2 + \left(\left(-x\right) - \left(t_1 + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\

\mathbf{elif}\;x \leq 0.019999999552965164:\\
\;\;\;\;\mathsf{copysign}\left(\log t_0 + \left(\left(3 \cdot \frac{1}{t_0} + 3 \cdot \frac{1}{{t_0}^{2}}\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{t_0}\right), x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{copysign}\left(\log \left(\left(t_1 + \left(\left|x\right| + x\right)\right) - t_2\right), x\right)\\


\end{array}

Error?

Target

Original20.5
Target0.1
Herbie13.0
\[\mathsf{copysign}\left(\mathsf{log1p}\left(\left|x\right| + \frac{\left|x\right|}{\mathsf{hypot}\left(1, \frac{1}{\left|x\right|}\right) + \frac{1}{\left|x\right|}}\right), x\right) \]

Derivation?

  1. Split input into 3 regimes
  2. if x < -0.5

    1. Initial program 16.0

      \[\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right) \]
    2. Taylor expanded in x around -inf 0.6

      \[\leadsto \mathsf{copysign}\left(\log \left(\left|x\right| + \color{blue}{\left(\left(0.125 \cdot \frac{1}{{x}^{3}} + -1 \cdot x\right) - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)}\right), x\right) \]
    3. Simplified0.6

      \[\leadsto \mathsf{copysign}\left(\log \left(\left|x\right| + \color{blue}{\left(0.125 \cdot \frac{1}{{x}^{3}} + \left(\left(-x\right) - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)}\right), x\right) \]
      Proof

      [Start]0.6

      \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \left(\left(0.125 \cdot \frac{1}{{x}^{3}} + -1 \cdot x\right) - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right), x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]0.6

      \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \left(\color{blue}{\left(-1 \cdot x + 0.125 \cdot \frac{1}{{x}^{3}}\right)} - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right), x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-107 [=>]0.6

      \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \color{blue}{\left(0.125 \cdot \frac{1}{{x}^{3}} + \left(-1 \cdot x - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)}\right), x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]0.6

      \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \left(0.125 \cdot \frac{1}{{x}^{3}} + \left(\color{blue}{x \cdot -1} - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-94 [<=]0.6

      \[ \mathsf{copysign}\left(\log \left(\left|x\right| + \left(0.125 \cdot \frac{1}{{x}^{3}} + \left(\color{blue}{\left(-x\right)} - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right) \]

    if -0.5 < x < 0.0199999996

    1. Initial program 25.7

      \[\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right) \]
    2. Taylor expanded in x around 0 25.5

      \[\leadsto \mathsf{copysign}\left(\color{blue}{-0.041666666666666664 \cdot \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot {x}^{4}\right) + \left(0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|} + \log \left(1 + \left|x\right|\right)\right)}, x\right) \]
    3. Simplified25.5

      \[\leadsto \mathsf{copysign}\left(\color{blue}{\log \left(1 + \left|x\right|\right) + \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|}\right)}, x\right) \]
      Proof

      [Start]25.5

      \[ \mathsf{copysign}\left(-0.041666666666666664 \cdot \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot {x}^{4}\right) + \left(0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|} + \log \left(1 + \left|x\right|\right)\right), x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]25.5

      \[ \mathsf{copysign}\left(-0.041666666666666664 \cdot \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot {x}^{4}\right) + \color{blue}{\left(\log \left(1 + \left|x\right|\right) + 0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|}\right)}, x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-82 [=>]25.5

      \[ \mathsf{copysign}\left(\color{blue}{\log \left(1 + \left|x\right|\right) + \left(-0.041666666666666664 \cdot \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|}\right)}, x\right) \]

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]25.5

      \[ \mathsf{copysign}\left(\log \left(1 + \left|x\right|\right) + \left(\color{blue}{\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right)} + 0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|}\right), x\right) \]

    if 0.0199999996 < x

    1. Initial program 15.4

      \[\mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right) \]
    2. Taylor expanded in x around inf 1.9

      \[\leadsto \mathsf{copysign}\left(\log \color{blue}{\left(\left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right) - 0.125 \cdot \frac{1}{{x}^{3}}\right)}, x\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification13.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(0.125 \cdot \frac{1}{{x}^{3}} + \left(\left(-x\right) - \left(0.5 \cdot \frac{1}{x} + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(1 + \left|x\right|\right) + \left(\left(3 \cdot \frac{1}{1 + \left|x\right|} + 3 \cdot \frac{1}{{\left(1 + \left|x\right|\right)}^{2}}\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{1 + \left|x\right|}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right) - 0.125 \cdot \frac{1}{{x}^{3}}\right), x\right)\\ \end{array} \]

Alternatives

Alternative 1
Error13.0
Cost39528
\[\begin{array}{l} t_0 := \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{elif}\;t_0 \leq 0.019999999552965164:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right) - 0.125 \cdot \frac{1}{{x}^{3}}\right), x\right)\\ \end{array} \]
Alternative 2
Error12.6
Cost39240
\[\begin{array}{l} t_0 := \mathsf{copysign}\left(\log \left(\left|x\right| + \sqrt{x \cdot x + 1}\right), x\right)\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{elif}\;t_0 \leq 5:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right), x\right)\\ \end{array} \]
Alternative 3
Error13.0
Cost29992
\[\begin{array}{l} t_0 := 1 + \left|x\right|\\ t_1 := 0.5 \cdot \frac{1}{x}\\ t_2 := 0.125 \cdot \frac{1}{{x}^{3}}\\ \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(t_2 + \left(\left(-x\right) - \left(t_1 + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log t_0 + \left(\left(3 \cdot \left(\frac{1}{t_0} + \frac{1}{{t_0}^{2}}\right)\right) \cdot \left(-0.041666666666666664 \cdot {x}^{4}\right) + 0.5 \cdot \frac{{x}^{2}}{t_0}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(t_1 + \left(\left|x\right| + x\right)\right) - t_2\right), x\right)\\ \end{array} \]
Alternative 4
Error13.0
Cost26472
\[\begin{array}{l} t_0 := 1 + \left|x\right|\\ t_1 := 0.5 \cdot \frac{1}{x}\\ t_2 := 0.125 \cdot \frac{1}{{x}^{3}}\\ \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(t_2 + \left(\left(-x\right) - \left(t_1 + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\left(\log t_0 + 0.5 \cdot \frac{{x}^{2}}{t_0}\right) + -0.125 \cdot \frac{{x}^{4}}{{t_0}^{2}}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(t_1 + \left(\left|x\right| + x\right)\right) - t_2\right), x\right)\\ \end{array} \]
Alternative 5
Error13.0
Cost16868
\[\begin{array}{l} t_0 := 0.5 \cdot \frac{1}{x}\\ t_1 := 1 + \left|x\right|\\ t_2 := 0.125 \cdot \frac{1}{{x}^{3}}\\ \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(t_2 + \left(\left(-x\right) - \left(t_0 + 0.0625 \cdot \frac{1}{{x}^{5}}\right)\right)\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(0.5 \cdot \frac{{x}^{2}}{t_1} + \log t_1, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(t_0 + \left(\left|x\right| + x\right)\right) - t_2\right), x\right)\\ \end{array} \]
Alternative 6
Error13.5
Cost10056
\[\begin{array}{l} \mathbf{if}\;x \leq -2:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(-x\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right), x\right)\\ \end{array} \]
Alternative 7
Error13.4
Cost10056
\[\begin{array}{l} \mathbf{if}\;x \leq -0.5:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left(\left|x\right| - x\right) + \frac{1}{x} \cdot -0.5\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(0.5 \cdot \frac{1}{x} + \left(\left|x\right| + x\right)\right), x\right)\\ \end{array} \]
Alternative 8
Error13.5
Cost9864
\[\begin{array}{l} \mathbf{if}\;x \leq -2:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{0.5}{x}\right), x\right)\\ \end{array} \]
Alternative 9
Error13.6
Cost9864
\[\begin{array}{l} \mathbf{if}\;x \leq -2:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + x\right), x\right)\\ \end{array} \]
Alternative 10
Error13.6
Cost9864
\[\begin{array}{l} \mathbf{if}\;x \leq -2:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + \left(-x\right)\right), x\right)\\ \mathbf{elif}\;x \leq 0.019999999552965164:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\left|x\right| + x\right), x\right)\\ \end{array} \]
Alternative 11
Error19.0
Cost6596
\[\begin{array}{l} \mathbf{if}\;x \leq -9.999999350456404 \cdot 10^{-39}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log x, x\right)\\ \end{array} \]
Alternative 12
Error14.8
Cost6596
\[\begin{array}{l} \mathbf{if}\;x \leq -9.999999350456404 \cdot 10^{-39}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{-0.5}{x}\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(\frac{0.5}{x}\right), x\right)\\ \end{array} \]
Alternative 13
Error23.3
Cost6564
\[\begin{array}{l} \mathbf{if}\;x \leq -9.999999350456404 \cdot 10^{-39}:\\ \;\;\;\;\mathsf{copysign}\left(\log \left(-x\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{copysign}\left(\log x, x\right)\\ \end{array} \]
Alternative 14
Error27.6
Cost6464
\[\mathsf{copysign}\left(\log x, x\right) \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (x)
  :name "Rust f32::asinh"
  :precision binary32

  :herbie-target
  (copysign (log1p (+ (fabs x) (/ (fabs x) (+ (hypot 1.0 (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))))) x)

  (copysign (log (+ (fabs x) (sqrt (+ (* x x) 1.0)))) x))