
(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)))
(if (<= z -2.15e+136)
(/ (+ x (/ y t)) (+ x 1.0))
(if (<= z 5e+42)
(/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0))
(/ (- x (* y (+ (/ x (* y t_1)) (/ z (- x (* z t)))))) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double tmp;
if (z <= -2.15e+136) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 5e+42) {
tmp = (x + (((z * y) - x) / t_1)) / (x + 1.0);
} else {
tmp = (x - (y * ((x / (y * t_1)) + (z / (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) :: t_1
real(8) :: tmp
t_1 = (z * t) - x
if (z <= (-2.15d+136)) then
tmp = (x + (y / t)) / (x + 1.0d0)
else if (z <= 5d+42) then
tmp = (x + (((z * y) - x) / t_1)) / (x + 1.0d0)
else
tmp = (x - (y * ((x / (y * t_1)) + (z / (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 t_1 = (z * t) - x;
double tmp;
if (z <= -2.15e+136) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 5e+42) {
tmp = (x + (((z * y) - x) / t_1)) / (x + 1.0);
} else {
tmp = (x - (y * ((x / (y * t_1)) + (z / (x - (z * t)))))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x tmp = 0 if z <= -2.15e+136: tmp = (x + (y / t)) / (x + 1.0) elif z <= 5e+42: tmp = (x + (((z * y) - x) / t_1)) / (x + 1.0) else: tmp = (x - (y * ((x / (y * t_1)) + (z / (x - (z * t)))))) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) tmp = 0.0 if (z <= -2.15e+136) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); elseif (z <= 5e+42) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)); else tmp = Float64(Float64(x - Float64(y * Float64(Float64(x / Float64(y * t_1)) + Float64(z / Float64(x - Float64(z * t)))))) / 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 (z <= -2.15e+136) tmp = (x + (y / t)) / (x + 1.0); elseif (z <= 5e+42) tmp = (x + (((z * y) - x) / t_1)) / (x + 1.0); else tmp = (x - (y * ((x / (y * t_1)) + (z / (x - (z * 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]}, If[LessEqual[z, -2.15e+136], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+42], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * N[(N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+136}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+42}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot \left(\frac{x}{y \cdot t\_1} + \frac{z}{x - z \cdot t}\right)}{x + 1}\\
\end{array}
\end{array}
if z < -2.1499999999999999e136Initial program 68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in z around inf 97.4%
if -2.1499999999999999e136 < z < 5.00000000000000007e42Initial program 98.7%
if 5.00000000000000007e42 < z Initial program 64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in y around inf 94.2%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(if (<= z -5.6e+130)
(/ (+ x (/ y t)) (+ x 1.0))
(if (<= z 1.26e+85)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
(+
(+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0))))
(/ x (* t (* z (- -1.0 x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.6e+130) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 1.26e+85) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) + (x / (t * (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 (z <= (-5.6d+130)) then
tmp = (x + (y / t)) / (x + 1.0d0)
else if (z <= 1.26d+85) then
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
else
tmp = ((x / (x + 1.0d0)) + (y / (t * (x + 1.0d0)))) + (x / (t * (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 (z <= -5.6e+130) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 1.26e+85) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) + (x / (t * (z * (-1.0 - x))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.6e+130: tmp = (x + (y / t)) / (x + 1.0) elif z <= 1.26e+85: tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) else: tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) + (x / (t * (z * (-1.0 - x)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.6e+130) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); elseif (z <= 1.26e+85) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); else tmp = Float64(Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))) + Float64(x / Float64(t * Float64(z * Float64(-1.0 - x))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.6e+130) tmp = (x + (y / t)) / (x + 1.0); elseif (z <= 1.26e+85) tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); else tmp = ((x / (x + 1.0)) + (y / (t * (x + 1.0)))) + (x / (t * (z * (-1.0 - x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.6e+130], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.26e+85], 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], N[(N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(t * N[(z * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+130}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+85}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\right) + \frac{x}{t \cdot \left(z \cdot \left(-1 - x\right)\right)}\\
\end{array}
\end{array}
if z < -5.5999999999999997e130Initial program 68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in z around inf 97.4%
if -5.5999999999999997e130 < z < 1.26000000000000003e85Initial program 98.2%
if 1.26000000000000003e85 < z Initial program 60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in t around inf 83.1%
Final simplification95.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.8e+132)
(/ (+ x (/ y t)) (+ x 1.0))
(if (<= z 5.4e+90)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
(- (/ x (+ x 1.0)) (/ (+ (/ x (* z (+ x 1.0))) (/ y (- -1.0 x))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.8e+132) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 5.4e+90) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) + (y / (-1.0 - x))) / t);
}
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.8d+132)) then
tmp = (x + (y / t)) / (x + 1.0d0)
else if (z <= 5.4d+90) then
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
else
tmp = (x / (x + 1.0d0)) - (((x / (z * (x + 1.0d0))) + (y / ((-1.0d0) - x))) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.8e+132) {
tmp = (x + (y / t)) / (x + 1.0);
} else if (z <= 5.4e+90) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) + (y / (-1.0 - x))) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.8e+132: tmp = (x + (y / t)) / (x + 1.0) elif z <= 5.4e+90: tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) else: tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) + (y / (-1.0 - x))) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.8e+132) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); elseif (z <= 5.4e+90) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(x + 1.0)) - Float64(Float64(Float64(x / Float64(z * Float64(x + 1.0))) + Float64(y / Float64(-1.0 - x))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.8e+132) tmp = (x + (y / t)) / (x + 1.0); elseif (z <= 5.4e+90) tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); else tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) + (y / (-1.0 - x))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.8e+132], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+90], 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], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+132}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+90}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} - \frac{\frac{x}{z \cdot \left(x + 1\right)} + \frac{y}{-1 - x}}{t}\\
\end{array}
\end{array}
if z < -2.7999999999999999e132Initial program 68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in z around inf 97.4%
if -2.7999999999999999e132 < z < 5.4e90Initial program 98.2%
if 5.4e90 < z Initial program 60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
+-commutative83.1%
distribute-lft-out--83.1%
+-commutative83.1%
+-commutative83.1%
Simplified83.1%
Final simplification95.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.2e+131) (not (<= z 8.6e+90))) (/ (+ x (/ y t)) (+ 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 <= -2.2e+131) || !(z <= 8.6e+90)) {
tmp = (x + (y / t)) / (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 <= (-2.2d+131)) .or. (.not. (z <= 8.6d+90))) then
tmp = (x + (y / t)) / (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 <= -2.2e+131) || !(z <= 8.6e+90)) {
tmp = (x + (y / t)) / (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 <= -2.2e+131) or not (z <= 8.6e+90): tmp = (x + (y / t)) / (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 <= -2.2e+131) || !(z <= 8.6e+90)) tmp = Float64(Float64(x + Float64(y / t)) / 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 <= -2.2e+131) || ~((z <= 8.6e+90))) tmp = (x + (y / t)) / (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, -2.2e+131], N[Not[LessEqual[z, 8.6e+90]], $MachinePrecision]], N[(N[(x + N[(y / t), $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 -2.2 \cdot 10^{+131} \lor \neg \left(z \leq 8.6 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\end{array}
\end{array}
if z < -2.1999999999999999e131 or 8.5999999999999994e90 < z Initial program 64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in z around inf 89.5%
if -2.1999999999999999e131 < z < 8.5999999999999994e90Initial program 98.2%
Final simplification95.4%
(FPCore (x y z t)
:precision binary64
(if (<= x -7e-61)
1.0
(if (<= x 1.8e-270)
(/ y t)
(if (<= x 5e-124) x (if (<= x 2.05e-68) (/ y t) (/ x (+ x 1.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-61) {
tmp = 1.0;
} else if (x <= 1.8e-270) {
tmp = y / t;
} else if (x <= 5e-124) {
tmp = x;
} else if (x <= 2.05e-68) {
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 <= (-7d-61)) then
tmp = 1.0d0
else if (x <= 1.8d-270) then
tmp = y / t
else if (x <= 5d-124) then
tmp = x
else if (x <= 2.05d-68) 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 <= -7e-61) {
tmp = 1.0;
} else if (x <= 1.8e-270) {
tmp = y / t;
} else if (x <= 5e-124) {
tmp = x;
} else if (x <= 2.05e-68) {
tmp = y / t;
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7e-61: tmp = 1.0 elif x <= 1.8e-270: tmp = y / t elif x <= 5e-124: tmp = x elif x <= 2.05e-68: tmp = y / t else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7e-61) tmp = 1.0; elseif (x <= 1.8e-270) tmp = Float64(y / t); elseif (x <= 5e-124) tmp = x; elseif (x <= 2.05e-68) 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 <= -7e-61) tmp = 1.0; elseif (x <= 1.8e-270) tmp = y / t; elseif (x <= 5e-124) tmp = x; elseif (x <= 2.05e-68) tmp = y / t; else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7e-61], 1.0, If[LessEqual[x, 1.8e-270], N[(y / t), $MachinePrecision], If[LessEqual[x, 5e-124], x, If[LessEqual[x, 2.05e-68], N[(y / t), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-61}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-270}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-124}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-68}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -7.0000000000000006e-61Initial program 85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y around inf 98.8%
Taylor expanded in z around inf 72.5%
Taylor expanded in x around inf 80.1%
if -7.0000000000000006e-61 < x < 1.7999999999999999e-270 or 5.0000000000000003e-124 < x < 2.05000000000000011e-68Initial program 80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y around inf 76.9%
Taylor expanded in z around inf 75.5%
Taylor expanded in x around 0 64.1%
if 1.7999999999999999e-270 < x < 5.0000000000000003e-124Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in x around 0 38.7%
if 2.05000000000000011e-68 < x Initial program 90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in t around inf 81.8%
+-commutative81.8%
Simplified81.8%
Final simplification71.7%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.1e-58)
1.0
(if (<= x 1.8e-270)
(/ y t)
(if (<= x 2.2e-124) x (if (<= x 2.1e-66) (/ y t) 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.1e-58) {
tmp = 1.0;
} else if (x <= 1.8e-270) {
tmp = y / t;
} else if (x <= 2.2e-124) {
tmp = x;
} else if (x <= 2.1e-66) {
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 <= (-1.1d-58)) then
tmp = 1.0d0
else if (x <= 1.8d-270) then
tmp = y / t
else if (x <= 2.2d-124) then
tmp = x
else if (x <= 2.1d-66) 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 <= -1.1e-58) {
tmp = 1.0;
} else if (x <= 1.8e-270) {
tmp = y / t;
} else if (x <= 2.2e-124) {
tmp = x;
} else if (x <= 2.1e-66) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.1e-58: tmp = 1.0 elif x <= 1.8e-270: tmp = y / t elif x <= 2.2e-124: tmp = x elif x <= 2.1e-66: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.1e-58) tmp = 1.0; elseif (x <= 1.8e-270) tmp = Float64(y / t); elseif (x <= 2.2e-124) tmp = x; elseif (x <= 2.1e-66) 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 <= -1.1e-58) tmp = 1.0; elseif (x <= 1.8e-270) tmp = y / t; elseif (x <= 2.2e-124) tmp = x; elseif (x <= 2.1e-66) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.1e-58], 1.0, If[LessEqual[x, 1.8e-270], N[(y / t), $MachinePrecision], If[LessEqual[x, 2.2e-124], x, If[LessEqual[x, 2.1e-66], N[(y / t), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-58}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-270}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-124}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-66}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.10000000000000003e-58 or 2.1e-66 < x Initial program 88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y around inf 99.3%
Taylor expanded in z around inf 74.3%
Taylor expanded in x around inf 80.7%
if -1.10000000000000003e-58 < x < 1.7999999999999999e-270 or 2.1999999999999999e-124 < x < 2.1e-66Initial program 80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y around inf 76.9%
Taylor expanded in z around inf 75.5%
Taylor expanded in x around 0 64.1%
if 1.7999999999999999e-270 < x < 2.1999999999999999e-124Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in x around 0 38.7%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.8e-61)
1.0
(if (<= x 9.6e-254)
(/ y t)
(if (<= x 1.35e-51) (- 1.0 (* y (/ z x))) (/ x (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.8e-61) {
tmp = 1.0;
} else if (x <= 9.6e-254) {
tmp = y / t;
} else if (x <= 1.35e-51) {
tmp = 1.0 - (y * (z / 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 <= (-1.8d-61)) then
tmp = 1.0d0
else if (x <= 9.6d-254) then
tmp = y / t
else if (x <= 1.35d-51) then
tmp = 1.0d0 - (y * (z / 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 <= -1.8e-61) {
tmp = 1.0;
} else if (x <= 9.6e-254) {
tmp = y / t;
} else if (x <= 1.35e-51) {
tmp = 1.0 - (y * (z / x));
} else {
tmp = x / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.8e-61: tmp = 1.0 elif x <= 9.6e-254: tmp = y / t elif x <= 1.35e-51: tmp = 1.0 - (y * (z / x)) else: tmp = x / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.8e-61) tmp = 1.0; elseif (x <= 9.6e-254) tmp = Float64(y / t); elseif (x <= 1.35e-51) tmp = Float64(1.0 - Float64(y * Float64(z / 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 <= -1.8e-61) tmp = 1.0; elseif (x <= 9.6e-254) tmp = y / t; elseif (x <= 1.35e-51) tmp = 1.0 - (y * (z / x)); else tmp = x / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.8e-61], 1.0, If[LessEqual[x, 9.6e-254], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.35e-51], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-61}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-254}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-51}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\
\end{array}
\end{array}
if x < -1.80000000000000007e-61Initial program 85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in y around inf 98.8%
Taylor expanded in z around inf 72.5%
Taylor expanded in x around inf 80.1%
if -1.80000000000000007e-61 < x < 9.60000000000000007e-254Initial program 80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y around inf 74.0%
Taylor expanded in z around inf 80.0%
Taylor expanded in x around 0 64.4%
if 9.60000000000000007e-254 < x < 1.3499999999999999e-51Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around 0 49.8%
associate-+r+49.8%
mul-1-neg49.8%
unsub-neg49.8%
+-commutative49.8%
associate-/l*49.9%
+-commutative49.9%
Simplified49.9%
div-sub49.9%
pow149.9%
pow149.9%
pow-div49.9%
metadata-eval49.9%
metadata-eval49.9%
Applied egg-rr49.9%
Taylor expanded in x around 0 49.8%
associate-*r/49.9%
Simplified49.9%
if 1.3499999999999999e-51 < x Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
Final simplification73.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.6e-92) (not (<= t 8.6e-132))) (/ (+ 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 <= -3.6e-92) || !(t <= 8.6e-132)) {
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 <= (-3.6d-92)) .or. (.not. (t <= 8.6d-132))) 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 <= -3.6e-92) || !(t <= 8.6e-132)) {
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 <= -3.6e-92) or not (t <= 8.6e-132): 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 <= -3.6e-92) || !(t <= 8.6e-132)) 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 <= -3.6e-92) || ~((t <= 8.6e-132))) 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, -3.6e-92], N[Not[LessEqual[t, 8.6e-132]], $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 -3.6 \cdot 10^{-92} \lor \neg \left(t \leq 8.6 \cdot 10^{-132}\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 < -3.60000000000000016e-92 or 8.5999999999999994e-132 < t Initial program 84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in z around inf 84.8%
if -3.60000000000000016e-92 < t < 8.5999999999999994e-132Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 77.1%
associate-+r+77.1%
mul-1-neg77.1%
unsub-neg77.1%
+-commutative77.1%
associate-/l*82.9%
+-commutative82.9%
Simplified82.9%
div-sub82.9%
pow182.9%
pow182.9%
pow-div82.9%
metadata-eval82.9%
metadata-eval82.9%
Applied egg-rr82.9%
associate-*r/77.1%
add-sqr-sqrt41.5%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod30.4%
add-sqr-sqrt54.7%
associate-/r*54.6%
times-frac58.3%
add-sqr-sqrt34.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod38.4%
add-sqr-sqrt78.7%
Applied egg-rr78.7%
Final simplification82.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.4e-89) (not (<= t 5e-50))) (/ (+ x (/ y t)) (+ x 1.0)) (+ 1.0 (/ (* y (/ z x)) (- -1.0 x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.4e-89) || !(t <= 5e-50)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((y * (z / x)) / (-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.4d-89)) .or. (.not. (t <= 5d-50))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 + ((y * (z / x)) / ((-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.4e-89) || !(t <= 5e-50)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((y * (z / x)) / (-1.0 - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.4e-89) or not (t <= 5e-50): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 + ((y * (z / x)) / (-1.0 - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.4e-89) || !(t <= 5e-50)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 + Float64(Float64(y * Float64(z / x)) / Float64(-1.0 - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.4e-89) || ~((t <= 5e-50))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 + ((y * (z / x)) / (-1.0 - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.4e-89], N[Not[LessEqual[t, 5e-50]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-89} \lor \neg \left(t \leq 5 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y \cdot \frac{z}{x}}{-1 - x}\\
\end{array}
\end{array}
if t < -2.40000000000000016e-89 or 4.99999999999999968e-50 < t Initial program 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in z around inf 87.9%
if -2.40000000000000016e-89 < t < 4.99999999999999968e-50Initial program 94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 74.4%
associate-+r+74.4%
mul-1-neg74.4%
unsub-neg74.4%
+-commutative74.4%
associate-/l*79.2%
+-commutative79.2%
Simplified79.2%
div-sub79.2%
pow179.2%
pow179.2%
pow-div79.2%
metadata-eval79.2%
metadata-eval79.2%
Applied egg-rr79.2%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.3e-15) (not (<= z 8e-29))) (/ (+ 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 <= -2.3e-15) || !(z <= 8e-29)) {
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 <= (-2.3d-15)) .or. (.not. (z <= 8d-29))) 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 <= -2.3e-15) || !(z <= 8e-29)) {
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 <= -2.3e-15) or not (z <= 8e-29): 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 <= -2.3e-15) || !(z <= 8e-29)) 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 <= -2.3e-15) || ~((z <= 8e-29))) 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, -2.3e-15], N[Not[LessEqual[z, 8e-29]], $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 -2.3 \cdot 10^{-15} \lor \neg \left(z \leq 8 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - y \cdot \frac{z}{x}\\
\end{array}
\end{array}
if z < -2.2999999999999999e-15 or 7.99999999999999955e-29 < z Initial program 75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in z around inf 84.7%
if -2.2999999999999999e-15 < z < 7.99999999999999955e-29Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 79.5%
associate-+r+79.5%
mul-1-neg79.5%
unsub-neg79.5%
+-commutative79.5%
associate-/l*79.6%
+-commutative79.6%
Simplified79.6%
div-sub79.6%
pow179.6%
pow179.6%
pow-div79.6%
metadata-eval79.6%
metadata-eval79.6%
Applied egg-rr79.6%
Taylor expanded in x around 0 76.6%
associate-*r/76.7%
Simplified76.7%
Final simplification80.8%
(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.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around inf 92.3%
Taylor expanded in z around inf 73.6%
Taylor expanded in x around inf 53.9%
Final simplification53.9%
(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 2024055
(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)))