
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(* (/ y (+ x 1.0)) (/ z t_1))
(if (<= t_2 1e+239) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / (x + 1.0)) * (z / t_1);
} else if (t_2 <= 1e+239) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / (x + 1.0)) * (z / t_1);
} else if (t_2 <= 1e+239) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = (y / (x + 1.0)) * (z / t_1) elif t_2 <= 1e+239: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(z / t_1)); elseif (t_2 <= 1e+239) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / (x + 1.0)) * (z / t_1); elseif (t_2 <= 1e+239) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+239], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t_1}}{x + 1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{x + 1} \cdot \frac{z}{t_1}\\
\mathbf{elif}\;t_2 \leq 10^{+239}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -inf.0Initial program 23.0%
*-commutative23.0%
Simplified23.0%
Taylor expanded in y around inf 22.6%
times-frac90.7%
+-commutative90.7%
Simplified90.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 9.99999999999999991e238Initial program 98.1%
if 9.99999999999999991e238 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 22.6%
*-commutative22.6%
Simplified22.6%
Taylor expanded in z around inf 92.0%
Final simplification97.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ z (- (* z t) x)))))
(if (<= x -3.5e-21)
1.0
(if (<= x -2.5e-103)
t_1
(if (<= x 2.3e-203)
(/ y t)
(if (<= x 1.3e-157) t_1 (/ x (+ x 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z / ((z * t) - x));
double tmp;
if (x <= -3.5e-21) {
tmp = 1.0;
} else if (x <= -2.5e-103) {
tmp = t_1;
} else if (x <= 2.3e-203) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = t_1;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / ((z * t) - x))
if (x <= (-3.5d-21)) then
tmp = 1.0d0
else if (x <= (-2.5d-103)) then
tmp = t_1
else if (x <= 2.3d-203) then
tmp = y / t
else if (x <= 1.3d-157) then
tmp = t_1
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z / ((z * t) - x));
double tmp;
if (x <= -3.5e-21) {
tmp = 1.0;
} else if (x <= -2.5e-103) {
tmp = t_1;
} else if (x <= 2.3e-203) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = t_1;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z / ((z * t) - x)) tmp = 0 if x <= -3.5e-21: tmp = 1.0 elif x <= -2.5e-103: tmp = t_1 elif x <= 2.3e-203: tmp = y / t elif x <= 1.3e-157: tmp = t_1 else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z / Float64(Float64(z * t) - x))) tmp = 0.0 if (x <= -3.5e-21) tmp = 1.0; elseif (x <= -2.5e-103) tmp = t_1; elseif (x <= 2.3e-203) tmp = Float64(y / t); elseif (x <= 1.3e-157) tmp = t_1; else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z / ((z * t) - x)); tmp = 0.0; if (x <= -3.5e-21) tmp = 1.0; elseif (x <= -2.5e-103) tmp = t_1; elseif (x <= 2.3e-203) tmp = y / t; elseif (x <= 1.3e-157) tmp = t_1; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e-21], 1.0, If[LessEqual[x, -2.5e-103], t$95$1, If[LessEqual[x, 2.3e-203], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.3e-157], t$95$1, N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{z \cdot t - x}\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-21}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-203}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -3.5000000000000003e-21Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around inf 85.5%
+-commutative85.5%
Simplified85.5%
clear-num85.5%
inv-pow85.5%
+-commutative85.5%
Applied egg-rr85.5%
unpow-185.5%
Simplified85.5%
Taylor expanded in x around inf 89.5%
if -3.5000000000000003e-21 < x < -2.49999999999999983e-103 or 2.29999999999999991e-203 < x < 1.29999999999999994e-157Initial program 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y around inf 59.4%
times-frac67.7%
+-commutative67.7%
Simplified67.7%
Taylor expanded in x around 0 67.7%
if -2.49999999999999983e-103 < x < 2.29999999999999991e-203Initial program 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around inf 45.5%
times-frac58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in x around 0 58.7%
Taylor expanded in z around inf 67.3%
if 1.29999999999999994e-157 < x Initial program 87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in t around inf 73.7%
+-commutative73.7%
Simplified73.7%
Final simplification75.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ z (- (* z t) x)))))
(if (<= x -4.2e-22)
(- 1.0 (* (/ y x) (/ z x)))
(if (<= x -7.6e-103)
t_1
(if (<= x 3.1e-202)
(/ y t)
(if (<= x 1.3e-157) t_1 (/ x (+ x 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z / ((z * t) - x));
double tmp;
if (x <= -4.2e-22) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= -7.6e-103) {
tmp = t_1;
} else if (x <= 3.1e-202) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = t_1;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / ((z * t) - x))
if (x <= (-4.2d-22)) then
tmp = 1.0d0 - ((y / x) * (z / x))
else if (x <= (-7.6d-103)) then
tmp = t_1
else if (x <= 3.1d-202) then
tmp = y / t
else if (x <= 1.3d-157) then
tmp = t_1
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z / ((z * t) - x));
double tmp;
if (x <= -4.2e-22) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= -7.6e-103) {
tmp = t_1;
} else if (x <= 3.1e-202) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = t_1;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z / ((z * t) - x)) tmp = 0 if x <= -4.2e-22: tmp = 1.0 - ((y / x) * (z / x)) elif x <= -7.6e-103: tmp = t_1 elif x <= 3.1e-202: tmp = y / t elif x <= 1.3e-157: tmp = t_1 else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z / Float64(Float64(z * t) - x))) tmp = 0.0 if (x <= -4.2e-22) tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(z / x))); elseif (x <= -7.6e-103) tmp = t_1; elseif (x <= 3.1e-202) tmp = Float64(y / t); elseif (x <= 1.3e-157) tmp = t_1; else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z / ((z * t) - x)); tmp = 0.0; if (x <= -4.2e-22) tmp = 1.0 - ((y / x) * (z / x)); elseif (x <= -7.6e-103) tmp = t_1; elseif (x <= 3.1e-202) tmp = y / t; elseif (x <= 1.3e-157) tmp = t_1; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.2e-22], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.6e-103], t$95$1, If[LessEqual[x, 3.1e-202], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.3e-157], t$95$1, N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{z \cdot t - x}\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{-22}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \frac{z}{x}\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-202}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -4.20000000000000016e-22Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around 0 91.7%
associate-+r+91.7%
+-commutative91.7%
associate-+l+91.7%
mul-1-neg91.7%
unsub-neg91.7%
associate-/l*94.4%
+-commutative94.4%
Simplified94.4%
Taylor expanded in y around 0 91.7%
mul-1-neg91.7%
unsub-neg91.7%
associate-/r*91.7%
associate-*l/94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in x around inf 91.4%
unpow291.4%
times-frac94.2%
Simplified94.2%
if -4.20000000000000016e-22 < x < -7.6000000000000001e-103 or 3.1e-202 < x < 1.29999999999999994e-157Initial program 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y around inf 59.4%
times-frac67.7%
+-commutative67.7%
Simplified67.7%
Taylor expanded in x around 0 67.7%
if -7.6000000000000001e-103 < x < 3.1e-202Initial program 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around inf 45.5%
times-frac58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in x around 0 58.7%
Taylor expanded in z around inf 67.3%
if 1.29999999999999994e-157 < x Initial program 87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in t around inf 73.7%
+-commutative73.7%
Simplified73.7%
Final simplification76.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)))
(if (<= x -2.2e-21)
(- 1.0 (* (/ y x) (/ z x)))
(if (<= x -2.5e-103)
(* y (/ z t_1))
(if (<= x 1.9e-201)
(/ y t)
(if (<= x 1.3e-157) (/ y (/ t_1 z)) (/ x (+ x 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (x <= -2.2e-21) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= -2.5e-103) {
tmp = y * (z / t_1);
} else if (x <= 1.9e-201) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = y / (t_1 / z);
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * t) - x
if (x <= (-2.2d-21)) then
tmp = 1.0d0 - ((y / x) * (z / x))
else if (x <= (-2.5d-103)) then
tmp = y * (z / t_1)
else if (x <= 1.9d-201) then
tmp = y / t
else if (x <= 1.3d-157) then
tmp = y / (t_1 / z)
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (x <= -2.2e-21) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= -2.5e-103) {
tmp = y * (z / t_1);
} else if (x <= 1.9e-201) {
tmp = y / t;
} else if (x <= 1.3e-157) {
tmp = y / (t_1 / z);
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x tmp = 0 if x <= -2.2e-21: tmp = 1.0 - ((y / x) * (z / x)) elif x <= -2.5e-103: tmp = y * (z / t_1) elif x <= 1.9e-201: tmp = y / t elif x <= 1.3e-157: tmp = y / (t_1 / z) else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) tmp = 0.0 if (x <= -2.2e-21) tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(z / x))); elseif (x <= -2.5e-103) tmp = Float64(y * Float64(z / t_1)); elseif (x <= 1.9e-201) tmp = Float64(y / t); elseif (x <= 1.3e-157) tmp = Float64(y / Float64(t_1 / z)); else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; tmp = 0.0; if (x <= -2.2e-21) tmp = 1.0 - ((y / x) * (z / x)); elseif (x <= -2.5e-103) tmp = y * (z / t_1); elseif (x <= 1.9e-201) tmp = y / t; elseif (x <= 1.3e-157) tmp = y / (t_1 / z); else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[x, -2.2e-21], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.5e-103], N[(y * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e-201], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.3e-157], N[(y / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{-21}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \frac{z}{x}\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-103}:\\
\;\;\;\;y \cdot \frac{z}{t_1}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-201}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-157}:\\
\;\;\;\;\frac{y}{\frac{t_1}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -2.2000000000000001e-21Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around 0 91.7%
associate-+r+91.7%
+-commutative91.7%
associate-+l+91.7%
mul-1-neg91.7%
unsub-neg91.7%
associate-/l*94.4%
+-commutative94.4%
Simplified94.4%
Taylor expanded in y around 0 91.7%
mul-1-neg91.7%
unsub-neg91.7%
associate-/r*91.7%
associate-*l/94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in x around inf 91.4%
unpow291.4%
times-frac94.2%
Simplified94.2%
if -2.2000000000000001e-21 < x < -2.49999999999999983e-103Initial program 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in y around inf 43.7%
times-frac51.9%
+-commutative51.9%
Simplified51.9%
Taylor expanded in x around 0 51.9%
if -2.49999999999999983e-103 < x < 1.9e-201Initial program 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around inf 45.5%
times-frac58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in x around 0 58.7%
Taylor expanded in z around inf 67.3%
if 1.9e-201 < x < 1.29999999999999994e-157Initial program 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 90.9%
times-frac99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 99.1%
clear-num99.3%
un-div-inv99.6%
*-commutative99.6%
Applied egg-rr99.6%
if 1.29999999999999994e-157 < x Initial program 87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in t around inf 73.7%
+-commutative73.7%
Simplified73.7%
Final simplification76.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.55e-25) (not (<= t 3.5e-105))) (/ (+ x (/ y t)) (+ x 1.0)) (/ (+ x (- 1.0 (/ y (/ x z)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.55e-25) || !(t <= 3.5e-105)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.55d-25)) .or. (.not. (t <= 3.5d-105))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (x + (1.0d0 - (y / (x / z)))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.55e-25) || !(t <= 3.5e-105)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.55e-25) or not (t <= 3.5e-105): tmp = (x + (y / t)) / (x + 1.0) else: tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.55e-25) || !(t <= 3.5e-105)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(1.0 - Float64(y / Float64(x / z)))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.55e-25) || ~((t <= 3.5e-105))) tmp = (x + (y / t)) / (x + 1.0); else tmp = (x + (1.0 - (y / (x / z)))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.55e-25], N[Not[LessEqual[t, 3.5e-105]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 - N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-25} \lor \neg \left(t \leq 3.5 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \left(1 - \frac{y}{\frac{x}{z}}\right)}{x + 1}\\
\end{array}
\end{array}
if t < -1.54999999999999997e-25 or 3.5e-105 < t Initial program 83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 89.9%
if -1.54999999999999997e-25 < t < 3.5e-105Initial program 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in t around 0 79.1%
associate-+r+79.1%
+-commutative79.1%
associate-+l+79.1%
mul-1-neg79.1%
unsub-neg79.1%
associate-/l*82.0%
+-commutative82.0%
Simplified82.0%
Final simplification86.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3e-29) (not (<= t 2e-105))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (* z (/ y x)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3e-29) || !(t <= 2e-105)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z * (y / x)) / (x + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-3d-29)) .or. (.not. (t <= 2d-105))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((z * (y / x)) / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3e-29) || !(t <= 2e-105)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((z * (y / x)) / (x + 1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3e-29) or not (t <= 2e-105): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((z * (y / x)) / (x + 1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3e-29) || !(t <= 2e-105)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(z * Float64(y / x)) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3e-29) || ~((t <= 2e-105))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((z * (y / x)) / (x + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3e-29], N[Not[LessEqual[t, 2e-105]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-29} \lor \neg \left(t \leq 2 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{z \cdot \frac{y}{x}}{x + 1}\\
\end{array}
\end{array}
if t < -3.0000000000000003e-29 or 1.99999999999999993e-105 < t Initial program 83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in z around inf 88.9%
if -3.0000000000000003e-29 < t < 1.99999999999999993e-105Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 79.5%
associate-+r+79.5%
+-commutative79.5%
associate-+l+79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in y around 0 79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/r*79.5%
associate-*l/79.5%
*-commutative79.5%
Simplified79.5%
Final simplification85.3%
(FPCore (x y z t) :precision binary64 (if (<= x -1.65e-19) (- 1.0 (* (/ y x) (/ z x))) (if (<= x 7e-17) (/ (+ x (/ y t)) (+ x 1.0)) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.65e-19) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= 7e-17) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.65d-19)) then
tmp = 1.0d0 - ((y / x) * (z / x))
else if (x <= 7d-17) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.65e-19) {
tmp = 1.0 - ((y / x) * (z / x));
} else if (x <= 7e-17) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.65e-19: tmp = 1.0 - ((y / x) * (z / x)) elif x <= 7e-17: tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.65e-19) tmp = Float64(1.0 - Float64(Float64(y / x) * Float64(z / x))); elseif (x <= 7e-17) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.65e-19) tmp = 1.0 - ((y / x) * (z / x)); elseif (x <= 7e-17) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.65e-19], N[(1.0 - N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e-17], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-19}:\\
\;\;\;\;1 - \frac{y}{x} \cdot \frac{z}{x}\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-17}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.6499999999999999e-19Initial program 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around 0 92.9%
associate-+r+92.9%
+-commutative92.9%
associate-+l+92.9%
mul-1-neg92.9%
unsub-neg92.9%
associate-/l*95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in y around 0 92.9%
mul-1-neg92.9%
unsub-neg92.9%
associate-/r*92.9%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in x around inf 92.5%
unpow292.5%
times-frac95.4%
Simplified95.4%
if -1.6499999999999999e-19 < x < 7.0000000000000003e-17Initial program 82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in z around inf 75.3%
if 7.0000000000000003e-17 < x Initial program 87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in t around inf 88.2%
+-commutative88.2%
Simplified88.2%
clear-num88.1%
inv-pow88.1%
+-commutative88.1%
Applied egg-rr88.1%
unpow-188.1%
Simplified88.1%
Taylor expanded in x around inf 90.6%
Final simplification84.1%
(FPCore (x y z t)
:precision binary64
(if (<= x -2.4e-22)
1.0
(if (<= x 2.6e-161)
(/ y t)
(if (<= x 3e-40) x (if (<= x 3.6e-17) (/ y t) 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.4e-22) {
tmp = 1.0;
} else if (x <= 2.6e-161) {
tmp = y / t;
} else if (x <= 3e-40) {
tmp = x;
} else if (x <= 3.6e-17) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.4d-22)) then
tmp = 1.0d0
else if (x <= 2.6d-161) then
tmp = y / t
else if (x <= 3d-40) then
tmp = x
else if (x <= 3.6d-17) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.4e-22) {
tmp = 1.0;
} else if (x <= 2.6e-161) {
tmp = y / t;
} else if (x <= 3e-40) {
tmp = x;
} else if (x <= 3.6e-17) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.4e-22: tmp = 1.0 elif x <= 2.6e-161: tmp = y / t elif x <= 3e-40: tmp = x elif x <= 3.6e-17: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.4e-22) tmp = 1.0; elseif (x <= 2.6e-161) tmp = Float64(y / t); elseif (x <= 3e-40) tmp = x; elseif (x <= 3.6e-17) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.4e-22) tmp = 1.0; elseif (x <= 2.6e-161) tmp = y / t; elseif (x <= 3e-40) tmp = x; elseif (x <= 3.6e-17) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.4e-22], 1.0, If[LessEqual[x, 2.6e-161], N[(y / t), $MachinePrecision], If[LessEqual[x, 3e-40], x, If[LessEqual[x, 3.6e-17], N[(y / t), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-22}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-161}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-40}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -2.40000000000000002e-22 or 3.59999999999999995e-17 < x Initial program 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in t around inf 86.7%
+-commutative86.7%
Simplified86.7%
clear-num86.7%
inv-pow86.7%
+-commutative86.7%
Applied egg-rr86.7%
unpow-186.7%
Simplified86.7%
Taylor expanded in x around inf 90.0%
if -2.40000000000000002e-22 < x < 2.59999999999999995e-161 or 3.0000000000000002e-40 < x < 3.59999999999999995e-17Initial program 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y around inf 47.9%
times-frac60.1%
+-commutative60.1%
Simplified60.1%
Taylor expanded in x around 0 60.1%
Taylor expanded in z around inf 60.7%
if 2.59999999999999995e-161 < x < 3.0000000000000002e-40Initial program 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in t around inf 43.8%
+-commutative43.8%
Simplified43.8%
Taylor expanded in x around 0 43.8%
Final simplification73.8%
(FPCore (x y z t) :precision binary64 (if (<= x -6e-22) 1.0 (if (<= x 2.75e-161) (/ y t) (/ x (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6e-22) {
tmp = 1.0;
} else if (x <= 2.75e-161) {
tmp = y / t;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-6d-22)) then
tmp = 1.0d0
else if (x <= 2.75d-161) then
tmp = y / t
else
tmp = x / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6e-22) {
tmp = 1.0;
} else if (x <= 2.75e-161) {
tmp = y / t;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -6e-22: tmp = 1.0 elif x <= 2.75e-161: tmp = y / t else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -6e-22) tmp = 1.0; elseif (x <= 2.75e-161) tmp = Float64(y / t); else tmp = Float64(x / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -6e-22) tmp = 1.0; elseif (x <= 2.75e-161) tmp = y / t; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -6e-22], 1.0, If[LessEqual[x, 2.75e-161], N[(y / t), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-22}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-161}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -5.9999999999999998e-22Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around inf 85.5%
+-commutative85.5%
Simplified85.5%
clear-num85.5%
inv-pow85.5%
+-commutative85.5%
Applied egg-rr85.5%
unpow-185.5%
Simplified85.5%
Taylor expanded in x around inf 89.5%
if -5.9999999999999998e-22 < x < 2.75e-161Initial program 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y around inf 49.4%
times-frac61.2%
+-commutative61.2%
Simplified61.2%
Taylor expanded in x around 0 61.2%
Taylor expanded in z around inf 60.9%
if 2.75e-161 < x Initial program 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in t around inf 72.8%
+-commutative72.8%
Simplified72.8%
Final simplification72.6%
(FPCore (x y z t) :precision binary64 (if (<= x -1.55e-19) 1.0 (if (<= x 5.5e-18) x 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.55e-19) {
tmp = 1.0;
} else if (x <= 5.5e-18) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.55d-19)) then
tmp = 1.0d0
else if (x <= 5.5d-18) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.55e-19) {
tmp = 1.0;
} else if (x <= 5.5e-18) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.55e-19: tmp = 1.0 elif x <= 5.5e-18: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.55e-19) tmp = 1.0; elseif (x <= 5.5e-18) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.55e-19) tmp = 1.0; elseif (x <= 5.5e-18) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.55e-19], 1.0, If[LessEqual[x, 5.5e-18], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{-19}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.5499999999999999e-19 or 5.5e-18 < x Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in t around inf 87.3%
+-commutative87.3%
Simplified87.3%
clear-num87.3%
inv-pow87.3%
+-commutative87.3%
Applied egg-rr87.3%
unpow-187.3%
Simplified87.3%
Taylor expanded in x around inf 90.6%
if -1.5499999999999999e-19 < x < 5.5e-18Initial program 82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in t around inf 24.8%
+-commutative24.8%
Simplified24.8%
Taylor expanded in x around 0 24.8%
Final simplification57.0%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in t around inf 55.3%
+-commutative55.3%
Simplified55.3%
clear-num55.3%
inv-pow55.3%
+-commutative55.3%
Applied egg-rr55.3%
unpow-155.3%
Simplified55.3%
Taylor expanded in x around inf 50.5%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2023293
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))