?

Average Error: 0.0 → 0.0
Time: 2.6s
Precision: binary64
Cost: 6976

?

\[0.5 \cdot \mathsf{log1p}\left(\frac{2 \cdot x}{1 - x}\right) \]
\[0.5 \cdot \mathsf{log1p}\left(x \cdot \frac{2}{1 - x}\right) \]
(FPCore (x) :precision binary64 (* 0.5 (log1p (/ (* 2.0 x) (- 1.0 x)))))
(FPCore (x) :precision binary64 (* 0.5 (log1p (* x (/ 2.0 (- 1.0 x))))))
double code(double x) {
	return 0.5 * log1p(((2.0 * x) / (1.0 - x)));
}
double code(double x) {
	return 0.5 * log1p((x * (2.0 / (1.0 - x))));
}
public static double code(double x) {
	return 0.5 * Math.log1p(((2.0 * x) / (1.0 - x)));
}
public static double code(double x) {
	return 0.5 * Math.log1p((x * (2.0 / (1.0 - x))));
}
def code(x):
	return 0.5 * math.log1p(((2.0 * x) / (1.0 - x)))
def code(x):
	return 0.5 * math.log1p((x * (2.0 / (1.0 - x))))
function code(x)
	return Float64(0.5 * log1p(Float64(Float64(2.0 * x) / Float64(1.0 - x))))
end
function code(x)
	return Float64(0.5 * log1p(Float64(x * Float64(2.0 / Float64(1.0 - x)))))
end
code[x_] := N[(0.5 * N[Log[1 + N[(N[(2.0 * x), $MachinePrecision] / N[(1.0 - x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := N[(0.5 * N[Log[1 + N[(x * N[(2.0 / N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
0.5 \cdot \mathsf{log1p}\left(\frac{2 \cdot x}{1 - x}\right)
0.5 \cdot \mathsf{log1p}\left(x \cdot \frac{2}{1 - x}\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

    \[0.5 \cdot \mathsf{log1p}\left(\frac{2 \cdot x}{1 - x}\right) \]
  2. Simplified0.0

    \[\leadsto \color{blue}{0.5 \cdot \mathsf{log1p}\left(\frac{2}{1 - x} \cdot x\right)} \]
    Proof

    [Start]0.0

    \[ 0.5 \cdot \mathsf{log1p}\left(\frac{2 \cdot x}{1 - x}\right) \]

    associate-*l/ [<=]0.0

    \[ 0.5 \cdot \mathsf{log1p}\left(\color{blue}{\frac{2}{1 - x} \cdot x}\right) \]
  3. Final simplification0.0

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

Alternatives

Alternative 1
Error1.4
Cost6720
\[0.5 \cdot \mathsf{log1p}\left(2 \cdot x\right) \]
Alternative 2
Error64.0
Cost6592
\[0.5 \cdot \mathsf{log1p}\left(-2\right) \]

Error

Reproduce?

herbie shell --seed 2023039 
(FPCore (x)
  :name "Rust f64::atanh"
  :precision binary64
  (* 0.5 (log1p (/ (* 2.0 x) (- 1.0 x)))))