
(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 12 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 (if (or (<= z -1.4e+47) (not (<= z 6e+83))) (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0)) (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.4e+47) || !(z <= 6e+83)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = (x + (((z * y) - x) / ((z * t) - 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 ((z <= (-1.4d+47)) .or. (.not. (z <= 6d+83))) then
tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
else
tmp = (x + (((z * y) - x) / ((z * t) - 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 ((z <= -1.4e+47) || !(z <= 6e+83)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.4e+47) or not (z <= 6e+83): tmp = (x + (y / (t - (x / z)))) / (x + 1.0) else: tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.4e+47) || !(z <= 6e+83)) tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.4e+47) || ~((z <= 6e+83))) tmp = (x + (y / (t - (x / z)))) / (x + 1.0); else tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.4e+47], N[Not[LessEqual[z, 6e+83]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+47} \lor \neg \left(z \leq 6 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\end{array}
\end{array}
if z < -1.39999999999999994e47 or 5.9999999999999999e83 < z Initial program 73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in z around inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
Simplified73.1%
Taylor expanded in y around inf 100.0%
if -1.39999999999999994e47 < z < 5.9999999999999999e83Initial program 99.8%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -29000000.0)
(+ 1.0 (/ -1.0 x))
(if (<= x -7e-173)
(- 1.0 (/ (* z y) x))
(if (<= x 4.2e-122)
(/ y (* t (+ x 1.0)))
(if (<= x 2.9e-47) (- 1.0 (* z (/ y x))) (/ x (+ x 1.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -29000000.0) {
tmp = 1.0 + (-1.0 / x);
} else if (x <= -7e-173) {
tmp = 1.0 - ((z * y) / x);
} else if (x <= 4.2e-122) {
tmp = y / (t * (x + 1.0));
} else if (x <= 2.9e-47) {
tmp = 1.0 - (z * (y / x));
} 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 <= (-29000000.0d0)) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (x <= (-7d-173)) then
tmp = 1.0d0 - ((z * y) / x)
else if (x <= 4.2d-122) then
tmp = y / (t * (x + 1.0d0))
else if (x <= 2.9d-47) then
tmp = 1.0d0 - (z * (y / x))
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 <= -29000000.0) {
tmp = 1.0 + (-1.0 / x);
} else if (x <= -7e-173) {
tmp = 1.0 - ((z * y) / x);
} else if (x <= 4.2e-122) {
tmp = y / (t * (x + 1.0));
} else if (x <= 2.9e-47) {
tmp = 1.0 - (z * (y / x));
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -29000000.0: tmp = 1.0 + (-1.0 / x) elif x <= -7e-173: tmp = 1.0 - ((z * y) / x) elif x <= 4.2e-122: tmp = y / (t * (x + 1.0)) elif x <= 2.9e-47: tmp = 1.0 - (z * (y / x)) else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -29000000.0) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (x <= -7e-173) tmp = Float64(1.0 - Float64(Float64(z * y) / x)); elseif (x <= 4.2e-122) tmp = Float64(y / Float64(t * Float64(x + 1.0))); elseif (x <= 2.9e-47) tmp = Float64(1.0 - Float64(z * Float64(y / x))); 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 <= -29000000.0) tmp = 1.0 + (-1.0 / x); elseif (x <= -7e-173) tmp = 1.0 - ((z * y) / x); elseif (x <= 4.2e-122) tmp = y / (t * (x + 1.0)); elseif (x <= 2.9e-47) tmp = 1.0 - (z * (y / x)); else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -29000000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7e-173], N[(1.0 - N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-122], N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-47], N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -29000000:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-173}:\\
\;\;\;\;1 - \frac{z \cdot y}{x}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-47}:\\
\;\;\;\;1 - z \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -2.9e7Initial program 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -2.9e7 < x < -7.00000000000000029e-173Initial program 90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in t around 0 56.1%
mul-1-neg56.1%
unsub-neg56.1%
associate-/l*56.0%
+-commutative56.0%
Simplified56.0%
Taylor expanded in y around 0 56.1%
mul-1-neg56.1%
sub-neg56.1%
times-frac49.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in x around 0 54.5%
if -7.00000000000000029e-173 < x < 4.19999999999999985e-122Initial program 80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 81.6%
Taylor expanded in y around inf 68.8%
if 4.19999999999999985e-122 < x < 2.9e-47Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
associate-/l*75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 75.9%
mul-1-neg75.9%
sub-neg75.9%
times-frac75.9%
+-commutative75.9%
Simplified75.9%
Taylor expanded in x around 0 75.9%
if 2.9e-47 < x Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in t around inf 78.6%
+-commutative78.6%
Simplified78.6%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= x -12500000000.0)
(+ 1.0 (/ -1.0 x))
(if (<= x -6.3e-173)
(- 1.0 (/ (* z y) x))
(if (<= x 3.5e-125)
(/ (/ y t) (+ x 1.0))
(if (<= x 1.35e-47) (- 1.0 (* z (/ y x))) (/ x (+ x 1.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -12500000000.0) {
tmp = 1.0 + (-1.0 / x);
} else if (x <= -6.3e-173) {
tmp = 1.0 - ((z * y) / x);
} else if (x <= 3.5e-125) {
tmp = (y / t) / (x + 1.0);
} else if (x <= 1.35e-47) {
tmp = 1.0 - (z * (y / x));
} 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 <= (-12500000000.0d0)) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (x <= (-6.3d-173)) then
tmp = 1.0d0 - ((z * y) / x)
else if (x <= 3.5d-125) then
tmp = (y / t) / (x + 1.0d0)
else if (x <= 1.35d-47) then
tmp = 1.0d0 - (z * (y / x))
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 <= -12500000000.0) {
tmp = 1.0 + (-1.0 / x);
} else if (x <= -6.3e-173) {
tmp = 1.0 - ((z * y) / x);
} else if (x <= 3.5e-125) {
tmp = (y / t) / (x + 1.0);
} else if (x <= 1.35e-47) {
tmp = 1.0 - (z * (y / x));
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -12500000000.0: tmp = 1.0 + (-1.0 / x) elif x <= -6.3e-173: tmp = 1.0 - ((z * y) / x) elif x <= 3.5e-125: tmp = (y / t) / (x + 1.0) elif x <= 1.35e-47: tmp = 1.0 - (z * (y / x)) else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -12500000000.0) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (x <= -6.3e-173) tmp = Float64(1.0 - Float64(Float64(z * y) / x)); elseif (x <= 3.5e-125) tmp = Float64(Float64(y / t) / Float64(x + 1.0)); elseif (x <= 1.35e-47) tmp = Float64(1.0 - Float64(z * Float64(y / x))); 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 <= -12500000000.0) tmp = 1.0 + (-1.0 / x); elseif (x <= -6.3e-173) tmp = 1.0 - ((z * y) / x); elseif (x <= 3.5e-125) tmp = (y / t) / (x + 1.0); elseif (x <= 1.35e-47) tmp = 1.0 - (z * (y / x)); else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -12500000000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.3e-173], N[(1.0 - N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-125], N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-47], N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -12500000000:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;x \leq -6.3 \cdot 10^{-173}:\\
\;\;\;\;1 - \frac{z \cdot y}{x}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{y}{t}}{x + 1}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-47}:\\
\;\;\;\;1 - z \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -1.25e10Initial program 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -1.25e10 < x < -6.29999999999999968e-173Initial program 90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in t around 0 56.1%
mul-1-neg56.1%
unsub-neg56.1%
associate-/l*56.0%
+-commutative56.0%
Simplified56.0%
Taylor expanded in y around 0 56.1%
mul-1-neg56.1%
sub-neg56.1%
times-frac49.9%
+-commutative49.9%
Simplified49.9%
Taylor expanded in x around 0 54.5%
if -6.29999999999999968e-173 < x < 3.49999999999999998e-125Initial program 80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 81.6%
Taylor expanded in y around inf 68.8%
associate-/r*68.8%
+-commutative68.8%
Simplified68.8%
if 3.49999999999999998e-125 < x < 1.3499999999999999e-47Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
associate-/l*75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in y around 0 75.9%
mul-1-neg75.9%
sub-neg75.9%
times-frac75.9%
+-commutative75.9%
Simplified75.9%
Taylor expanded in x around 0 75.9%
if 1.3499999999999999e-47 < x Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in t around inf 78.6%
+-commutative78.6%
Simplified78.6%
Final simplification77.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.3e-27) (not (<= t 1.15e-157))) (/ (+ x (/ y t)) (+ x 1.0)) (/ (+ 1.0 (- x (* y (/ z x)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.3e-27) || !(t <= 1.15e-157)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (1.0 + (x - (y * (z / 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 <= (-2.3d-27)) .or. (.not. (t <= 1.15d-157))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (1.0d0 + (x - (y * (z / 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 <= -2.3e-27) || !(t <= 1.15e-157)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.3e-27) or not (t <= 1.15e-157): tmp = (x + (y / t)) / (x + 1.0) else: tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.3e-27) || !(t <= 1.15e-157)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(1.0 + Float64(x - Float64(y * Float64(z / x)))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.3e-27) || ~((t <= 1.15e-157))) tmp = (x + (y / t)) / (x + 1.0); else tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.3e-27], N[Not[LessEqual[t, 1.15e-157]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-27} \lor \neg \left(t \leq 1.15 \cdot 10^{-157}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}\\
\end{array}
\end{array}
if t < -2.2999999999999999e-27 or 1.14999999999999994e-157 < t Initial program 84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in z around inf 85.1%
if -2.2999999999999999e-27 < t < 1.14999999999999994e-157Initial program 95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 78.4%
mul-1-neg78.4%
unsub-neg78.4%
associate-/l*80.6%
+-commutative80.6%
Simplified80.6%
Final simplification83.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.6e-219) (not (<= z 1.65e-233))) (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0)) (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e-219) || !(z <= 1.65e-233)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
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 ((z <= (-1.6d-219)) .or. (.not. (z <= 1.65d-233))) then
tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
else
tmp = 1.0d0 - (y * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e-219) || !(z <= 1.65e-233)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.6e-219) or not (z <= 1.65e-233): tmp = (x + (y / (t - (x / z)))) / (x + 1.0) else: tmp = 1.0 - (y * (z / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.6e-219) || !(z <= 1.65e-233)) tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(y * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.6e-219) || ~((z <= 1.65e-233))) tmp = (x + (y / (t - (x / z)))) / (x + 1.0); else tmp = 1.0 - (y * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.6e-219], N[Not[LessEqual[z, 1.65e-233]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-219} \lor \neg \left(z \leq 1.65 \cdot 10^{-233}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\end{array}
\end{array}
if z < -1.59999999999999999e-219 or 1.65e-233 < z Initial program 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in z around inf 86.6%
mul-1-neg86.6%
unsub-neg86.6%
Simplified86.6%
Taylor expanded in y around inf 92.6%
if -1.59999999999999999e-219 < z < 1.65e-233Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
unsub-neg91.6%
associate-/l*91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in y around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
times-frac85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around 0 91.6%
associate-/l*91.6%
Simplified91.6%
Final simplification92.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e-161) (not (<= y 4.9e-42))) (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0)) (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-161) || !(y <= 4.9e-42)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (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 ((y <= (-5.5d-161)) .or. (.not. (y <= 4.9d-42))) then
tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
else
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-161) || !(y <= 4.9e-42)) {
tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e-161) or not (y <= 4.9e-42): tmp = (x + (y / (t - (x / z)))) / (x + 1.0) else: tmp = (x + (x / (x - (z * t)))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e-161) || !(y <= 4.9e-42)) tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.5e-161) || ~((y <= 4.9e-42))) tmp = (x + (y / (t - (x / z)))) / (x + 1.0); else tmp = (x + (x / (x - (z * t)))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e-161], N[Not[LessEqual[y, 4.9e-42]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-161} \lor \neg \left(y \leq 4.9 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\end{array}
\end{array}
if y < -5.5e-161 or 4.9e-42 < y Initial program 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in z around inf 83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
Taylor expanded in y around inf 93.0%
if -5.5e-161 < y < 4.9e-42Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 95.1%
+-commutative95.1%
Simplified95.1%
Final simplification93.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.8e-30) (not (<= t 1.2e-157))) (/ (+ x (/ y t)) (+ x 1.0)) (+ 1.0 (* (/ y x) (/ z (- -1.0 x))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e-30) || !(t <= 1.2e-157)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((y / x) * (z / (-1.0 - x)));
}
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 <= (-2.8d-30)) .or. (.not. (t <= 1.2d-157))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 + ((y / x) * (z / ((-1.0d0) - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e-30) || !(t <= 1.2e-157)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((y / x) * (z / (-1.0 - x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.8e-30) or not (t <= 1.2e-157): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 + ((y / x) * (z / (-1.0 - x))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.8e-30) || !(t <= 1.2e-157)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 + Float64(Float64(y / x) * Float64(z / Float64(-1.0 - x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.8e-30) || ~((t <= 1.2e-157))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 + ((y / x) * (z / (-1.0 - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.8e-30], N[Not[LessEqual[t, 1.2e-157]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / x), $MachinePrecision] * N[(z / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-30} \lor \neg \left(t \leq 1.2 \cdot 10^{-157}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{x} \cdot \frac{z}{-1 - x}\\
\end{array}
\end{array}
if t < -2.79999999999999988e-30 or 1.2e-157 < t Initial program 84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in z around inf 85.1%
if -2.79999999999999988e-30 < t < 1.2e-157Initial program 95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 78.4%
mul-1-neg78.4%
unsub-neg78.4%
associate-/l*80.6%
+-commutative80.6%
Simplified80.6%
Taylor expanded in y around 0 78.4%
mul-1-neg78.4%
sub-neg78.4%
times-frac78.5%
+-commutative78.5%
Simplified78.5%
Final simplification82.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.8e-102) (not (<= z 1.1e-229))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.8e-102) || !(z <= 1.1e-229)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
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 ((z <= (-5.8d-102)) .or. (.not. (z <= 1.1d-229))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - (y * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.8e-102) || !(z <= 1.1e-229)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.8e-102) or not (z <= 1.1e-229): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - (y * (z / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.8e-102) || !(z <= 1.1e-229)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(y * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.8e-102) || ~((z <= 1.1e-229))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - (y * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.8e-102], N[Not[LessEqual[z, 1.1e-229]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-102} \lor \neg \left(z \leq 1.1 \cdot 10^{-229}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\end{array}
\end{array}
if z < -5.79999999999999973e-102 or 1.0999999999999999e-229 < z Initial program 84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in z around inf 80.5%
if -5.79999999999999973e-102 < z < 1.0999999999999999e-229Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-/l*83.2%
+-commutative83.2%
Simplified83.2%
Taylor expanded in y around 0 83.2%
mul-1-neg83.2%
sub-neg83.2%
times-frac78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 82.0%
associate-/l*82.0%
Simplified82.0%
Final simplification80.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.2e+27) (not (<= z 6.2e-78))) (/ x (+ x 1.0)) (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.2e+27) || !(z <= 6.2e-78)) {
tmp = x / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
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 ((z <= (-6.2d+27)) .or. (.not. (z <= 6.2d-78))) then
tmp = x / (x + 1.0d0)
else
tmp = 1.0d0 - (y * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.2e+27) || !(z <= 6.2e-78)) {
tmp = x / (x + 1.0);
} else {
tmp = 1.0 - (y * (z / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.2e+27) or not (z <= 6.2e-78): tmp = x / (x + 1.0) else: tmp = 1.0 - (y * (z / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.2e+27) || !(z <= 6.2e-78)) tmp = Float64(x / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(y * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.2e+27) || ~((z <= 6.2e-78))) tmp = x / (x + 1.0); else tmp = 1.0 - (y * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.2e+27], N[Not[LessEqual[z, 6.2e-78]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+27} \lor \neg \left(z \leq 6.2 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\end{array}
\end{array}
if z < -6.19999999999999992e27 or 6.20000000000000035e-78 < z Initial program 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in t around inf 56.9%
+-commutative56.9%
Simplified56.9%
if -6.19999999999999992e27 < z < 6.20000000000000035e-78Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*75.1%
+-commutative75.1%
Simplified75.1%
Taylor expanded in y around 0 75.1%
mul-1-neg75.1%
sub-neg75.1%
times-frac72.4%
+-commutative72.4%
Simplified72.4%
Taylor expanded in x around 0 72.6%
associate-/l*72.6%
Simplified72.6%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.05e+26) (not (<= z 2.65e+85))) (/ x (+ x 1.0)) (- 1.0 (/ (* z y) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.05e+26) || !(z <= 2.65e+85)) {
tmp = x / (x + 1.0);
} else {
tmp = 1.0 - ((z * y) / x);
}
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 ((z <= (-2.05d+26)) .or. (.not. (z <= 2.65d+85))) then
tmp = x / (x + 1.0d0)
else
tmp = 1.0d0 - ((z * y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.05e+26) || !(z <= 2.65e+85)) {
tmp = x / (x + 1.0);
} else {
tmp = 1.0 - ((z * y) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.05e+26) or not (z <= 2.65e+85): tmp = x / (x + 1.0) else: tmp = 1.0 - ((z * y) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.05e+26) || !(z <= 2.65e+85)) tmp = Float64(x / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(z * y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.05e+26) || ~((z <= 2.65e+85))) tmp = x / (x + 1.0); else tmp = 1.0 - ((z * y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.05e+26], N[Not[LessEqual[z, 2.65e+85]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+26} \lor \neg \left(z \leq 2.65 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{z \cdot y}{x}\\
\end{array}
\end{array}
if z < -2.04999999999999992e26 or 2.65e85 < z Initial program 73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in t around inf 58.5%
+-commutative58.5%
Simplified58.5%
if -2.04999999999999992e26 < z < 2.65e85Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 72.2%
mul-1-neg72.2%
unsub-neg72.2%
associate-/l*72.2%
+-commutative72.2%
Simplified72.2%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
sub-neg72.2%
times-frac70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in x around 0 68.1%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-22) (not (<= z 2.3e-80))) (/ x (+ x 1.0)) 1.0))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-22) || !(z <= 2.3e-80)) {
tmp = x / (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 ((z <= (-1.7d-22)) .or. (.not. (z <= 2.3d-80))) then
tmp = x / (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 ((z <= -1.7e-22) || !(z <= 2.3e-80)) {
tmp = x / (x + 1.0);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.7e-22) or not (z <= 2.3e-80): tmp = x / (x + 1.0) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e-22) || !(z <= 2.3e-80)) tmp = Float64(x / Float64(x + 1.0)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.7e-22) || ~((z <= 2.3e-80))) tmp = x / (x + 1.0); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-22], N[Not[LessEqual[z, 2.3e-80]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-22} \lor \neg \left(z \leq 2.3 \cdot 10^{-80}\right):\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < -1.6999999999999999e-22 or 2.2999999999999998e-80 < z Initial program 80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in t around inf 57.8%
+-commutative57.8%
Simplified57.8%
if -1.6999999999999999e-22 < z < 2.2999999999999998e-80Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
mul-1-neg99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around inf 76.2%
Taylor expanded in x around inf 63.8%
Final simplification60.2%
(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 88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in z around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
Simplified88.3%
Taylor expanded in y around inf 88.7%
Taylor expanded in x around inf 54.5%
Final simplification54.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 2024085
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))