Rust f32::acosh

Percentage Accurate: 52.9% → 98.4%
Time: 6.5s
Alternatives: 9
Speedup: 2.0×

Specification

?
\[x \geq 1\]
\[\begin{array}{l} \\ \cosh^{-1} x \end{array} \]
(FPCore (x) :precision binary32 (acosh x))
float code(float x) {
	return acoshf(x);
}
function code(x)
	return acosh(x)
end
function tmp = code(x)
	tmp = acosh(x);
end
\begin{array}{l}

\\
\cosh^{-1} x
\end{array}

Sampling outcomes in binary32 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 9 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: 52.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \log \left(x + \sqrt{x \cdot x - 1}\right) \end{array} \]
(FPCore (x) :precision binary32 (log (+ x (sqrt (- (* x x) 1.0)))))
float code(float x) {
	return logf((x + sqrtf(((x * x) - 1.0f))));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log((x + sqrt(((x * x) - 1.0e0))))
end function
function code(x)
	return log(Float32(x + sqrt(Float32(Float32(x * x) - Float32(1.0)))))
end
function tmp = code(x)
	tmp = log((x + sqrt(((x * x) - single(1.0)))));
end
\begin{array}{l}

\\
\log \left(x + \sqrt{x \cdot x - 1}\right)
\end{array}

Alternative 1: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right) \end{array} \]
(FPCore (x)
 :precision binary32
 (log (- (* x 2.0) (+ (/ 0.5 x) (/ 0.125 (pow x 3.0))))))
float code(float x) {
	return logf(((x * 2.0f) - ((0.5f / x) + (0.125f / powf(x, 3.0f)))));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log(((x * 2.0e0) - ((0.5e0 / x) + (0.125e0 / (x ** 3.0e0)))))
end function
function code(x)
	return log(Float32(Float32(x * Float32(2.0)) - Float32(Float32(Float32(0.5) / x) + Float32(Float32(0.125) / (x ^ Float32(3.0))))))
end
function tmp = code(x)
	tmp = log(((x * single(2.0)) - ((single(0.5) / x) + (single(0.125) / (x ^ single(3.0))))));
end
\begin{array}{l}

\\
\log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Taylor expanded in x around inf 98.5%

    \[\leadsto \log \color{blue}{\left(2 \cdot x - \left(0.5 \cdot \frac{1}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right)} \]
  3. Step-by-step derivation
    1. *-commutative98.5%

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

      \[\leadsto \log \left(x \cdot 2 - \left(\color{blue}{\frac{0.5 \cdot 1}{x}} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    3. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{\color{blue}{0.5}}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    4. associate-*r/98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{\frac{0.125 \cdot 1}{{x}^{3}}}\right)\right) \]
    5. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{\color{blue}{0.125}}{{x}^{3}}\right)\right) \]
  4. Simplified98.5%

    \[\leadsto \log \color{blue}{\left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right)} \]
  5. Final simplification98.5%

    \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right) \]

Alternative 2: 98.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \log \left(x \cdot 2 - \frac{0.5}{x}\right) \end{array} \]
(FPCore (x) :precision binary32 (log (- (* x 2.0) (/ 0.5 x))))
float code(float x) {
	return logf(((x * 2.0f) - (0.5f / x)));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log(((x * 2.0e0) - (0.5e0 / x)))
end function
function code(x)
	return log(Float32(Float32(x * Float32(2.0)) - Float32(Float32(0.5) / x)))
end
function tmp = code(x)
	tmp = log(((x * single(2.0)) - (single(0.5) / x)));
end
\begin{array}{l}

\\
\log \left(x \cdot 2 - \frac{0.5}{x}\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Taylor expanded in x around inf 98.4%

    \[\leadsto \log \color{blue}{\left(2 \cdot x - 0.5 \cdot \frac{1}{x}\right)} \]
  3. Step-by-step derivation
    1. *-commutative98.4%

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

      \[\leadsto \log \left(x \cdot 2 - \color{blue}{\frac{0.5 \cdot 1}{x}}\right) \]
    3. metadata-eval98.4%

      \[\leadsto \log \left(x \cdot 2 - \frac{\color{blue}{0.5}}{x}\right) \]
  4. Simplified98.4%

    \[\leadsto \log \color{blue}{\left(x \cdot 2 - \frac{0.5}{x}\right)} \]
  5. Final simplification98.4%

    \[\leadsto \log \left(x \cdot 2 - \frac{0.5}{x}\right) \]

Alternative 3: 96.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \log \left(x \cdot 2 - 0.001953125\right) \end{array} \]
(FPCore (x) :precision binary32 (log (- (* x 2.0) 0.001953125)))
float code(float x) {
	return logf(((x * 2.0f) - 0.001953125f));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log(((x * 2.0e0) - 0.001953125e0))
end function
function code(x)
	return log(Float32(Float32(x * Float32(2.0)) - Float32(0.001953125)))
end
function tmp = code(x)
	tmp = log(((x * single(2.0)) - single(0.001953125)));
end
\begin{array}{l}

\\
\log \left(x \cdot 2 - 0.001953125\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Taylor expanded in x around inf 98.5%

    \[\leadsto \log \color{blue}{\left(2 \cdot x - \left(0.5 \cdot \frac{1}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right)} \]
  3. Step-by-step derivation
    1. *-commutative98.5%

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

      \[\leadsto \log \left(x \cdot 2 - \left(\color{blue}{\frac{0.5 \cdot 1}{x}} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    3. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{\color{blue}{0.5}}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    4. associate-*r/98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{\frac{0.125 \cdot 1}{{x}^{3}}}\right)\right) \]
    5. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{\color{blue}{0.125}}{{x}^{3}}\right)\right) \]
  4. Simplified98.5%

    \[\leadsto \log \color{blue}{\left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right)} \]
  5. Step-by-step derivation
    1. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{\color{blue}{{0.5}^{3}}}{{x}^{3}}\right)\right) \]
    2. cube-div98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{{\left(\frac{0.5}{x}\right)}^{3}}\right)\right) \]
    3. add-cube-cbrt98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + {\color{blue}{\left(\left(\sqrt[3]{\frac{0.5}{x}} \cdot \sqrt[3]{\frac{0.5}{x}}\right) \cdot \sqrt[3]{\frac{0.5}{x}}\right)}}^{3}\right)\right) \]
    4. cube-prod98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{{\left(\sqrt[3]{\frac{0.5}{x}} \cdot \sqrt[3]{\frac{0.5}{x}}\right)}^{3} \cdot {\left(\sqrt[3]{\frac{0.5}{x}}\right)}^{3}}\right)\right) \]
  6. Applied egg-rr98.4%

    \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{0.001953125 \cdot {\left({x}^{-3}\right)}^{3}}\right)\right) \]
  7. Simplified97.7%

    \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{0.001953125}\right)\right) \]
  8. Taylor expanded in x around inf 97.4%

    \[\leadsto \log \left(x \cdot 2 - \color{blue}{0.001953125}\right) \]
  9. Final simplification97.4%

    \[\leadsto \log \left(x \cdot 2 - 0.001953125\right) \]

Alternative 4: 44.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \log \left(x + 1.0625\right) \end{array} \]
(FPCore (x) :precision binary32 (log (+ x 1.0625)))
float code(float x) {
	return logf((x + 1.0625f));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log((x + 1.0625e0))
end function
function code(x)
	return log(Float32(x + Float32(1.0625)))
end
function tmp = code(x)
	tmp = log((x + single(1.0625)));
end
\begin{array}{l}

\\
\log \left(x + 1.0625\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Step-by-step derivation
    1. difference-of-sqr-149.2%

      \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}}\right) \]
    2. sub-neg49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \color{blue}{\left(x + \left(-1\right)\right)}}\right) \]
    3. metadata-eval49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \left(x + \color{blue}{-1}\right)}\right) \]
  3. Applied egg-rr49.2%

    \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x + -1\right)}}\right) \]
  4. Taylor expanded in x around 0 -0.0%

    \[\leadsto \log \left(x + \color{blue}{\left(-0.125 \cdot \frac{{x}^{4}}{{\left(\sqrt{-1}\right)}^{3}} + \left(\sqrt{-1} + \left(0.5 \cdot \frac{{x}^{2}}{\sqrt{-1}} + 0.0625 \cdot \frac{{x}^{6}}{{\left(\sqrt{-1}\right)}^{5}}\right)\right)\right)}\right) \]
  5. Simplified44.5%

    \[\leadsto \log \left(x + \color{blue}{1.0625}\right) \]
  6. Final simplification44.5%

    \[\leadsto \log \left(x + 1.0625\right) \]

Alternative 5: 96.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \log \left(x + x\right) \end{array} \]
(FPCore (x) :precision binary32 (log (+ x x)))
float code(float x) {
	return logf((x + x));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log((x + x))
end function
function code(x)
	return log(Float32(x + x))
end
function tmp = code(x)
	tmp = log((x + x));
end
\begin{array}{l}

\\
\log \left(x + x\right)
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Taylor expanded in x around inf 97.4%

    \[\leadsto \log \left(x + \color{blue}{x}\right) \]
  3. Final simplification97.4%

    \[\leadsto \log \left(x + x\right) \]

Alternative 6: 44.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \log x \end{array} \]
(FPCore (x) :precision binary32 (log x))
float code(float x) {
	return logf(x);
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log(x)
end function
function code(x)
	return log(x)
end
function tmp = code(x)
	tmp = log(x);
end
\begin{array}{l}

\\
\log x
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Step-by-step derivation
    1. difference-of-sqr-149.2%

      \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}}\right) \]
    2. sub-neg49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \color{blue}{\left(x + \left(-1\right)\right)}}\right) \]
    3. metadata-eval49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \left(x + \color{blue}{-1}\right)}\right) \]
  3. Applied egg-rr49.2%

    \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x + -1\right)}}\right) \]
  4. Taylor expanded in x around 0 -0.0%

    \[\leadsto \log \left(x + \color{blue}{\left(-0.125 \cdot \frac{{x}^{4}}{{\left(\sqrt{-1}\right)}^{3}} + \left(\sqrt{-1} + \left(0.5 \cdot \frac{{x}^{2}}{\sqrt{-1}} + 0.0625 \cdot \frac{{x}^{6}}{{\left(\sqrt{-1}\right)}^{5}}\right)\right)\right)}\right) \]
  5. Simplified44.5%

    \[\leadsto \log \left(x + \color{blue}{1.0625}\right) \]
  6. Taylor expanded in x around inf 44.3%

    \[\leadsto \color{blue}{-1 \cdot \log \left(\frac{1}{x}\right)} \]
  7. Step-by-step derivation
    1. mul-1-neg44.3%

      \[\leadsto \color{blue}{-\log \left(\frac{1}{x}\right)} \]
    2. log-rec44.3%

      \[\leadsto -\color{blue}{\left(-\log x\right)} \]
    3. remove-double-neg44.3%

      \[\leadsto \color{blue}{\log x} \]
  8. Simplified44.3%

    \[\leadsto \color{blue}{\log x} \]
  9. Final simplification44.3%

    \[\leadsto \log x \]

Alternative 7: 20.8% accurate, 207.0× speedup?

\[\begin{array}{l} \\ 0.8333333333333334 \end{array} \]
(FPCore (x) :precision binary32 0.8333333333333334)
float code(float x) {
	return 0.8333333333333334f;
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = 0.8333333333333334e0
end function
function code(x)
	return Float32(0.8333333333333334)
end
function tmp = code(x)
	tmp = single(0.8333333333333334);
end
\begin{array}{l}

\\
0.8333333333333334
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Step-by-step derivation
    1. difference-of-sqr-149.2%

      \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}}\right) \]
    2. sub-neg49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \color{blue}{\left(x + \left(-1\right)\right)}}\right) \]
    3. metadata-eval49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \left(x + \color{blue}{-1}\right)}\right) \]
  3. Applied egg-rr49.2%

    \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x + -1\right)}}\right) \]
  4. Taylor expanded in x around 0 -0.0%

    \[\leadsto \color{blue}{-0.16666666666666666 \cdot \frac{{x}^{3}}{{\left(\sqrt{-1}\right)}^{3}} + \left(\frac{x}{\sqrt{-1}} + \log \left(\sqrt{-1}\right)\right)} \]
  5. Simplified20.7%

    \[\leadsto \color{blue}{0.8333333333333334} \]
  6. Final simplification20.7%

    \[\leadsto 0.8333333333333334 \]

Alternative 8: 22.3% accurate, 207.0× speedup?

\[\begin{array}{l} \\ 2.125 \end{array} \]
(FPCore (x) :precision binary32 2.125)
float code(float x) {
	return 2.125f;
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = 2.125e0
end function
function code(x)
	return Float32(2.125)
end
function tmp = code(x)
	tmp = single(2.125);
end
\begin{array}{l}

\\
2.125
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Step-by-step derivation
    1. difference-of-sqr-149.2%

      \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}}\right) \]
    2. sub-neg49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \color{blue}{\left(x + \left(-1\right)\right)}}\right) \]
    3. metadata-eval49.2%

      \[\leadsto \log \left(x + \sqrt{\left(x + 1\right) \cdot \left(x + \color{blue}{-1}\right)}\right) \]
  3. Applied egg-rr49.2%

    \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x + -1\right)}}\right) \]
  4. Taylor expanded in x around -inf -0.0%

    \[\leadsto \color{blue}{0.001388888888888889 \cdot \frac{45 \cdot \frac{1}{{\left({\left(\sqrt{-1}\right)}^{2} - 1\right)}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}} + \left(45 \cdot \frac{1}{\left({\left(\sqrt{-1}\right)}^{2} - 1\right) \cdot {\left(\sqrt{-1}\right)}^{4}} + 30 \cdot \frac{1}{{\left({\left(\sqrt{-1}\right)}^{2} - 1\right)}^{3}}\right)}{{x}^{6}} + \left(-1 \cdot \log \left(\frac{-1}{x}\right) + \left(\log \left({\left(\sqrt{-1}\right)}^{2} - 1\right) + \left(-0.041666666666666664 \cdot \frac{3 \cdot \frac{1}{{\left({\left(\sqrt{-1}\right)}^{2} - 1\right)}^{2}} + 3 \cdot \frac{1}{\left({\left(\sqrt{-1}\right)}^{2} - 1\right) \cdot {\left(\sqrt{-1}\right)}^{2}}}{{x}^{4}} + 0.5 \cdot \frac{1}{\left({\left(\sqrt{-1}\right)}^{2} - 1\right) \cdot {x}^{2}}\right)\right)\right)} \]
  5. Simplified22.0%

    \[\leadsto \color{blue}{2.125} \]
  6. Final simplification22.0%

    \[\leadsto 2.125 \]

Alternative 9: 31.0% accurate, 207.0× speedup?

\[\begin{array}{l} \\ 63.333333333333336 \end{array} \]
(FPCore (x) :precision binary32 63.333333333333336)
float code(float x) {
	return 63.333333333333336f;
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = 63.333333333333336e0
end function
function code(x)
	return Float32(63.333333333333336)
end
function tmp = code(x)
	tmp = single(63.333333333333336);
end
\begin{array}{l}

\\
63.333333333333336
\end{array}
Derivation
  1. Initial program 49.1%

    \[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
  2. Taylor expanded in x around inf 98.5%

    \[\leadsto \log \color{blue}{\left(2 \cdot x - \left(0.5 \cdot \frac{1}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right)} \]
  3. Step-by-step derivation
    1. *-commutative98.5%

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

      \[\leadsto \log \left(x \cdot 2 - \left(\color{blue}{\frac{0.5 \cdot 1}{x}} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    3. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{\color{blue}{0.5}}{x} + 0.125 \cdot \frac{1}{{x}^{3}}\right)\right) \]
    4. associate-*r/98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \color{blue}{\frac{0.125 \cdot 1}{{x}^{3}}}\right)\right) \]
    5. metadata-eval98.5%

      \[\leadsto \log \left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{\color{blue}{0.125}}{{x}^{3}}\right)\right) \]
  4. Simplified98.5%

    \[\leadsto \log \color{blue}{\left(x \cdot 2 - \left(\frac{0.5}{x} + \frac{0.125}{{x}^{3}}\right)\right)} \]
  5. Taylor expanded in x around 0 -0.0%

    \[\leadsto \color{blue}{4 \cdot {x}^{2} + \left(-3 \cdot \log x + \left(85.33333333333333 \cdot {x}^{6} + \left(-24 \cdot {x}^{4} + \log -0.125\right)\right)\right)} \]
  6. Simplified31.7%

    \[\leadsto \color{blue}{63.333333333333336} \]
  7. Final simplification31.7%

    \[\leadsto 63.333333333333336 \]

Developer target: 99.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \log \left(x + \sqrt{x - 1} \cdot \sqrt{x + 1}\right) \end{array} \]
(FPCore (x)
 :precision binary32
 (log (+ x (* (sqrt (- x 1.0)) (sqrt (+ x 1.0))))))
float code(float x) {
	return logf((x + (sqrtf((x - 1.0f)) * sqrtf((x + 1.0f)))));
}
real(4) function code(x)
    real(4), intent (in) :: x
    code = log((x + (sqrt((x - 1.0e0)) * sqrt((x + 1.0e0)))))
end function
function code(x)
	return log(Float32(x + Float32(sqrt(Float32(x - Float32(1.0))) * sqrt(Float32(x + Float32(1.0))))))
end
function tmp = code(x)
	tmp = log((x + (sqrt((x - single(1.0))) * sqrt((x + single(1.0))))));
end
\begin{array}{l}

\\
\log \left(x + \sqrt{x - 1} \cdot \sqrt{x + 1}\right)
\end{array}

Reproduce

?
herbie shell --seed 2023174 
(FPCore (x)
  :name "Rust f32::acosh"
  :precision binary32
  :pre (>= x 1.0)

  :herbie-target
  (log (+ x (* (sqrt (- x 1.0)) (sqrt (+ x 1.0)))))

  (log (+ x (sqrt (- (* x x) 1.0)))))