
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- y z) (- t z)) x))
double code(double x, double y, double z, double t) {
return ((y - z) / (t - z)) * x;
}
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 = ((y - z) / (t - z)) * x
end function
public static double code(double x, double y, double z, double t) {
return ((y - z) / (t - z)) * x;
}
def code(x, y, z, t): return ((y - z) / (t - z)) * x
function code(x, y, z, t) return Float64(Float64(Float64(y - z) / Float64(t - z)) * x) end
function tmp = code(x, y, z, t) tmp = ((y - z) / (t - z)) * x; end
code[x_, y_, z_, t_] := N[(N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y - z}{t - z} \cdot x
\end{array}
Initial program 84.1%
*-commutative84.1%
associate-*l/95.8%
Applied egg-rr95.8%
Final simplification95.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (/ x t))) (t_2 (* x (/ y (- t z)))))
(if (<= z -1.05e+109)
x
(if (<= z -1.06e-192)
t_2
(if (<= z 4e-260)
t_1
(if (<= z 9000.0)
t_2
(if (<= z 6.9e+37) t_1 (if (<= z 1.6e+97) t_2 x))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (x / t);
double t_2 = x * (y / (t - z));
double tmp;
if (z <= -1.05e+109) {
tmp = x;
} else if (z <= -1.06e-192) {
tmp = t_2;
} else if (z <= 4e-260) {
tmp = t_1;
} else if (z <= 9000.0) {
tmp = t_2;
} else if (z <= 6.9e+37) {
tmp = t_1;
} else if (z <= 1.6e+97) {
tmp = t_2;
} else {
tmp = 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y - z) * (x / t)
t_2 = x * (y / (t - z))
if (z <= (-1.05d+109)) then
tmp = x
else if (z <= (-1.06d-192)) then
tmp = t_2
else if (z <= 4d-260) then
tmp = t_1
else if (z <= 9000.0d0) then
tmp = t_2
else if (z <= 6.9d+37) then
tmp = t_1
else if (z <= 1.6d+97) then
tmp = t_2
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (x / t);
double t_2 = x * (y / (t - z));
double tmp;
if (z <= -1.05e+109) {
tmp = x;
} else if (z <= -1.06e-192) {
tmp = t_2;
} else if (z <= 4e-260) {
tmp = t_1;
} else if (z <= 9000.0) {
tmp = t_2;
} else if (z <= 6.9e+37) {
tmp = t_1;
} else if (z <= 1.6e+97) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (x / t) t_2 = x * (y / (t - z)) tmp = 0 if z <= -1.05e+109: tmp = x elif z <= -1.06e-192: tmp = t_2 elif z <= 4e-260: tmp = t_1 elif z <= 9000.0: tmp = t_2 elif z <= 6.9e+37: tmp = t_1 elif z <= 1.6e+97: tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(x / t)) t_2 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -1.05e+109) tmp = x; elseif (z <= -1.06e-192) tmp = t_2; elseif (z <= 4e-260) tmp = t_1; elseif (z <= 9000.0) tmp = t_2; elseif (z <= 6.9e+37) tmp = t_1; elseif (z <= 1.6e+97) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (x / t); t_2 = x * (y / (t - z)); tmp = 0.0; if (z <= -1.05e+109) tmp = x; elseif (z <= -1.06e-192) tmp = t_2; elseif (z <= 4e-260) tmp = t_1; elseif (z <= 9000.0) tmp = t_2; elseif (z <= 6.9e+37) tmp = t_1; elseif (z <= 1.6e+97) tmp = t_2; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+109], x, If[LessEqual[z, -1.06e-192], t$95$2, If[LessEqual[z, 4e-260], t$95$1, If[LessEqual[z, 9000.0], t$95$2, If[LessEqual[z, 6.9e+37], t$95$1, If[LessEqual[z, 1.6e+97], t$95$2, x]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{x}{t}\\
t_2 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-192}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.0500000000000001e109 or 1.60000000000000008e97 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -1.0500000000000001e109 < z < -1.06e-192 or 3.99999999999999985e-260 < z < 9e3 or 6.8999999999999996e37 < z < 1.60000000000000008e97Initial program 89.5%
*-commutative89.5%
associate-*l/96.2%
Applied egg-rr96.2%
Taylor expanded in y around inf 73.7%
if -1.06e-192 < z < 3.99999999999999985e-260 or 9e3 < z < 6.8999999999999996e37Initial program 91.5%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in t around inf 86.4%
associate-/l*80.5%
associate-/r/90.6%
Applied egg-rr90.6%
Final simplification73.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -1.26e+113)
x
(if (<= z -1.4e-192)
t_1
(if (<= z 5e-260)
(* (- y z) (/ x t))
(if (<= z 8.8e-85)
(* y (/ x (- t z)))
(if (<= z 3.45e+41)
(/ x (/ t (- y z)))
(if (<= z 1.25e+95) t_1 x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -1.26e+113) {
tmp = x;
} else if (z <= -1.4e-192) {
tmp = t_1;
} else if (z <= 5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 8.8e-85) {
tmp = y * (x / (t - z));
} else if (z <= 3.45e+41) {
tmp = x / (t / (y - z));
} else if (z <= 1.25e+95) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-1.26d+113)) then
tmp = x
else if (z <= (-1.4d-192)) then
tmp = t_1
else if (z <= 5d-260) then
tmp = (y - z) * (x / t)
else if (z <= 8.8d-85) then
tmp = y * (x / (t - z))
else if (z <= 3.45d+41) then
tmp = x / (t / (y - z))
else if (z <= 1.25d+95) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -1.26e+113) {
tmp = x;
} else if (z <= -1.4e-192) {
tmp = t_1;
} else if (z <= 5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 8.8e-85) {
tmp = y * (x / (t - z));
} else if (z <= 3.45e+41) {
tmp = x / (t / (y - z));
} else if (z <= 1.25e+95) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -1.26e+113: tmp = x elif z <= -1.4e-192: tmp = t_1 elif z <= 5e-260: tmp = (y - z) * (x / t) elif z <= 8.8e-85: tmp = y * (x / (t - z)) elif z <= 3.45e+41: tmp = x / (t / (y - z)) elif z <= 1.25e+95: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -1.26e+113) tmp = x; elseif (z <= -1.4e-192) tmp = t_1; elseif (z <= 5e-260) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 8.8e-85) tmp = Float64(y * Float64(x / Float64(t - z))); elseif (z <= 3.45e+41) tmp = Float64(x / Float64(t / Float64(y - z))); elseif (z <= 1.25e+95) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (z <= -1.26e+113) tmp = x; elseif (z <= -1.4e-192) tmp = t_1; elseif (z <= 5e-260) tmp = (y - z) * (x / t); elseif (z <= 8.8e-85) tmp = y * (x / (t - z)); elseif (z <= 3.45e+41) tmp = x / (t / (y - z)); elseif (z <= 1.25e+95) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.26e+113], x, If[LessEqual[z, -1.4e-192], t$95$1, If[LessEqual[z, 5e-260], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-85], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.45e+41], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+95], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -1.26 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-260}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-85}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2599999999999999e113 or 1.25000000000000006e95 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -1.2599999999999999e113 < z < -1.40000000000000002e-192 or 3.4500000000000001e41 < z < 1.25000000000000006e95Initial program 81.6%
*-commutative81.6%
associate-*l/98.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 64.6%
if -1.40000000000000002e-192 < z < 5.0000000000000003e-260Initial program 93.8%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in t around inf 93.8%
associate-/l*83.5%
associate-/r/96.9%
Applied egg-rr96.9%
if 5.0000000000000003e-260 < z < 8.8e-85Initial program 99.8%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in y around inf 94.5%
associate-*l/90.2%
*-commutative90.2%
Simplified90.2%
if 8.8e-85 < z < 3.4500000000000001e41Initial program 90.2%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in t around inf 69.0%
associate-/l*71.6%
Simplified71.6%
Final simplification73.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -8.5e+112)
x
(if (<= z -2.8e-192)
t_1
(if (<= z 3.5e-260)
(* (- y z) (/ x t))
(if (<= z 2.35e-88)
(/ y (/ (- t z) x))
(if (<= z 1.15e+38)
(/ x (/ t (- y z)))
(if (<= z 3e+96) t_1 x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -8.5e+112) {
tmp = x;
} else if (z <= -2.8e-192) {
tmp = t_1;
} else if (z <= 3.5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 2.35e-88) {
tmp = y / ((t - z) / x);
} else if (z <= 1.15e+38) {
tmp = x / (t / (y - z));
} else if (z <= 3e+96) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-8.5d+112)) then
tmp = x
else if (z <= (-2.8d-192)) then
tmp = t_1
else if (z <= 3.5d-260) then
tmp = (y - z) * (x / t)
else if (z <= 2.35d-88) then
tmp = y / ((t - z) / x)
else if (z <= 1.15d+38) then
tmp = x / (t / (y - z))
else if (z <= 3d+96) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -8.5e+112) {
tmp = x;
} else if (z <= -2.8e-192) {
tmp = t_1;
} else if (z <= 3.5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 2.35e-88) {
tmp = y / ((t - z) / x);
} else if (z <= 1.15e+38) {
tmp = x / (t / (y - z));
} else if (z <= 3e+96) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -8.5e+112: tmp = x elif z <= -2.8e-192: tmp = t_1 elif z <= 3.5e-260: tmp = (y - z) * (x / t) elif z <= 2.35e-88: tmp = y / ((t - z) / x) elif z <= 1.15e+38: tmp = x / (t / (y - z)) elif z <= 3e+96: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -8.5e+112) tmp = x; elseif (z <= -2.8e-192) tmp = t_1; elseif (z <= 3.5e-260) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 2.35e-88) tmp = Float64(y / Float64(Float64(t - z) / x)); elseif (z <= 1.15e+38) tmp = Float64(x / Float64(t / Float64(y - z))); elseif (z <= 3e+96) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (z <= -8.5e+112) tmp = x; elseif (z <= -2.8e-192) tmp = t_1; elseif (z <= 3.5e-260) tmp = (y - z) * (x / t); elseif (z <= 2.35e-88) tmp = y / ((t - z) / x); elseif (z <= 1.15e+38) tmp = x / (t / (y - z)); elseif (z <= 3e+96) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+112], x, If[LessEqual[z, -2.8e-192], t$95$1, If[LessEqual[z, 3.5e-260], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e-88], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+38], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+96], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-260}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-88}:\\
\;\;\;\;\frac{y}{\frac{t - z}{x}}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.50000000000000047e112 or 3e96 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -8.50000000000000047e112 < z < -2.80000000000000004e-192 or 1.1500000000000001e38 < z < 3e96Initial program 81.6%
*-commutative81.6%
associate-*l/98.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 64.6%
if -2.80000000000000004e-192 < z < 3.5e-260Initial program 93.8%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in t around inf 93.8%
associate-/l*83.5%
associate-/r/96.9%
Applied egg-rr96.9%
if 3.5e-260 < z < 2.35e-88Initial program 99.8%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 94.4%
associate-*l/90.0%
*-commutative90.0%
Simplified90.0%
clear-num89.8%
un-div-inv90.0%
Applied egg-rr90.0%
if 2.35e-88 < z < 1.1500000000000001e38Initial program 90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 69.8%
associate-/l*72.3%
Simplified72.3%
Final simplification73.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -9.2e+108)
x
(if (<= z -6.4e-193)
t_1
(if (<= z 4.5e-260)
(* (- y z) (/ x t))
(if (<= z 1.1e-87)
(/ (* y x) (- t z))
(if (<= z 3.05e+41)
(/ x (/ t (- y z)))
(if (<= z 1.25e+94) t_1 x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -9.2e+108) {
tmp = x;
} else if (z <= -6.4e-193) {
tmp = t_1;
} else if (z <= 4.5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 1.1e-87) {
tmp = (y * x) / (t - z);
} else if (z <= 3.05e+41) {
tmp = x / (t / (y - z));
} else if (z <= 1.25e+94) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-9.2d+108)) then
tmp = x
else if (z <= (-6.4d-193)) then
tmp = t_1
else if (z <= 4.5d-260) then
tmp = (y - z) * (x / t)
else if (z <= 1.1d-87) then
tmp = (y * x) / (t - z)
else if (z <= 3.05d+41) then
tmp = x / (t / (y - z))
else if (z <= 1.25d+94) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -9.2e+108) {
tmp = x;
} else if (z <= -6.4e-193) {
tmp = t_1;
} else if (z <= 4.5e-260) {
tmp = (y - z) * (x / t);
} else if (z <= 1.1e-87) {
tmp = (y * x) / (t - z);
} else if (z <= 3.05e+41) {
tmp = x / (t / (y - z));
} else if (z <= 1.25e+94) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -9.2e+108: tmp = x elif z <= -6.4e-193: tmp = t_1 elif z <= 4.5e-260: tmp = (y - z) * (x / t) elif z <= 1.1e-87: tmp = (y * x) / (t - z) elif z <= 3.05e+41: tmp = x / (t / (y - z)) elif z <= 1.25e+94: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -9.2e+108) tmp = x; elseif (z <= -6.4e-193) tmp = t_1; elseif (z <= 4.5e-260) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 1.1e-87) tmp = Float64(Float64(y * x) / Float64(t - z)); elseif (z <= 3.05e+41) tmp = Float64(x / Float64(t / Float64(y - z))); elseif (z <= 1.25e+94) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (z <= -9.2e+108) tmp = x; elseif (z <= -6.4e-193) tmp = t_1; elseif (z <= 4.5e-260) tmp = (y - z) * (x / t); elseif (z <= 1.1e-87) tmp = (y * x) / (t - z); elseif (z <= 3.05e+41) tmp = x / (t / (y - z)); elseif (z <= 1.25e+94) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+108], x, If[LessEqual[z, -6.4e-193], t$95$1, If[LessEqual[z, 4.5e-260], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-87], N[(N[(y * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+41], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+94], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-260}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;\frac{y \cdot x}{t - z}\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.1999999999999996e108 or 1.25000000000000003e94 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -9.1999999999999996e108 < z < -6.40000000000000011e-193 or 3.04999999999999999e41 < z < 1.25000000000000003e94Initial program 81.6%
*-commutative81.6%
associate-*l/98.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 64.6%
if -6.40000000000000011e-193 < z < 4.4999999999999997e-260Initial program 93.8%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in t around inf 93.8%
associate-/l*83.5%
associate-/r/96.9%
Applied egg-rr96.9%
if 4.4999999999999997e-260 < z < 1.09999999999999994e-87Initial program 99.8%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 94.4%
if 1.09999999999999994e-87 < z < 3.04999999999999999e41Initial program 90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 69.8%
associate-/l*72.3%
Simplified72.3%
Final simplification74.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -2.7e+111)
x
(if (<= z -5e-217)
t_1
(if (<= z 5.8e-260)
(/ (- y z) (/ t x))
(if (<= z 8e-86)
(/ (* y x) (- t z))
(if (<= z 2.7e+38)
(/ x (/ t (- y z)))
(if (<= z 8.5e+92) t_1 x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -2.7e+111) {
tmp = x;
} else if (z <= -5e-217) {
tmp = t_1;
} else if (z <= 5.8e-260) {
tmp = (y - z) / (t / x);
} else if (z <= 8e-86) {
tmp = (y * x) / (t - z);
} else if (z <= 2.7e+38) {
tmp = x / (t / (y - z));
} else if (z <= 8.5e+92) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-2.7d+111)) then
tmp = x
else if (z <= (-5d-217)) then
tmp = t_1
else if (z <= 5.8d-260) then
tmp = (y - z) / (t / x)
else if (z <= 8d-86) then
tmp = (y * x) / (t - z)
else if (z <= 2.7d+38) then
tmp = x / (t / (y - z))
else if (z <= 8.5d+92) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -2.7e+111) {
tmp = x;
} else if (z <= -5e-217) {
tmp = t_1;
} else if (z <= 5.8e-260) {
tmp = (y - z) / (t / x);
} else if (z <= 8e-86) {
tmp = (y * x) / (t - z);
} else if (z <= 2.7e+38) {
tmp = x / (t / (y - z));
} else if (z <= 8.5e+92) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -2.7e+111: tmp = x elif z <= -5e-217: tmp = t_1 elif z <= 5.8e-260: tmp = (y - z) / (t / x) elif z <= 8e-86: tmp = (y * x) / (t - z) elif z <= 2.7e+38: tmp = x / (t / (y - z)) elif z <= 8.5e+92: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -2.7e+111) tmp = x; elseif (z <= -5e-217) tmp = t_1; elseif (z <= 5.8e-260) tmp = Float64(Float64(y - z) / Float64(t / x)); elseif (z <= 8e-86) tmp = Float64(Float64(y * x) / Float64(t - z)); elseif (z <= 2.7e+38) tmp = Float64(x / Float64(t / Float64(y - z))); elseif (z <= 8.5e+92) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (z <= -2.7e+111) tmp = x; elseif (z <= -5e-217) tmp = t_1; elseif (z <= 5.8e-260) tmp = (y - z) / (t / x); elseif (z <= 8e-86) tmp = (y * x) / (t - z); elseif (z <= 2.7e+38) tmp = x / (t / (y - z)); elseif (z <= 8.5e+92) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+111], x, If[LessEqual[z, -5e-217], t$95$1, If[LessEqual[z, 5.8e-260], N[(N[(y - z), $MachinePrecision] / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-86], N[(N[(y * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+38], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+92], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-260}:\\
\;\;\;\;\frac{y - z}{\frac{t}{x}}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-86}:\\
\;\;\;\;\frac{y \cdot x}{t - z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.6999999999999999e111 or 8.5000000000000001e92 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -2.6999999999999999e111 < z < -5.0000000000000002e-217 or 2.69999999999999996e38 < z < 8.5000000000000001e92Initial program 83.2%
*-commutative83.2%
associate-*l/98.5%
Applied egg-rr98.5%
Taylor expanded in y around inf 67.7%
if -5.0000000000000002e-217 < z < 5.7999999999999999e-260Initial program 92.7%
*-commutative92.7%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in t around inf 96.4%
if 5.7999999999999999e-260 < z < 8.00000000000000068e-86Initial program 99.8%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 94.4%
if 8.00000000000000068e-86 < z < 2.69999999999999996e38Initial program 90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 69.8%
associate-/l*72.3%
Simplified72.3%
Final simplification74.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x (- t z)))))
(if (<= z -1.95e+114)
x
(if (<= z 2.5e-86)
t_1
(if (<= z 5.9e+38) (* (- y z) (/ x t)) (if (<= z 3.2e+95) t_1 x))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double tmp;
if (z <= -1.95e+114) {
tmp = x;
} else if (z <= 2.5e-86) {
tmp = t_1;
} else if (z <= 5.9e+38) {
tmp = (y - z) * (x / t);
} else if (z <= 3.2e+95) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = y * (x / (t - z))
if (z <= (-1.95d+114)) then
tmp = x
else if (z <= 2.5d-86) then
tmp = t_1
else if (z <= 5.9d+38) then
tmp = (y - z) * (x / t)
else if (z <= 3.2d+95) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double tmp;
if (z <= -1.95e+114) {
tmp = x;
} else if (z <= 2.5e-86) {
tmp = t_1;
} else if (z <= 5.9e+38) {
tmp = (y - z) * (x / t);
} else if (z <= 3.2e+95) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / (t - z)) tmp = 0 if z <= -1.95e+114: tmp = x elif z <= 2.5e-86: tmp = t_1 elif z <= 5.9e+38: tmp = (y - z) * (x / t) elif z <= 3.2e+95: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / Float64(t - z))) tmp = 0.0 if (z <= -1.95e+114) tmp = x; elseif (z <= 2.5e-86) tmp = t_1; elseif (z <= 5.9e+38) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 3.2e+95) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / (t - z)); tmp = 0.0; if (z <= -1.95e+114) tmp = x; elseif (z <= 2.5e-86) tmp = t_1; elseif (z <= 5.9e+38) tmp = (y - z) * (x / t); elseif (z <= 3.2e+95) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+114], x, If[LessEqual[z, 2.5e-86], t$95$1, If[LessEqual[z, 5.9e+38], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+95], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{t - z}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+114}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{+38}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.95e114 or 3.2000000000000001e95 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -1.95e114 < z < 2.4999999999999999e-86 or 5.89999999999999981e38 < z < 3.2000000000000001e95Initial program 90.0%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in y around inf 75.6%
associate-*l/76.6%
*-commutative76.6%
Simplified76.6%
if 2.4999999999999999e-86 < z < 5.89999999999999981e38Initial program 90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 69.8%
associate-/l*72.3%
associate-/r/69.8%
Applied egg-rr69.8%
Final simplification71.3%
(FPCore (x y z t) :precision binary64 (if (<= z -5.4e+216) (/ (- x) (/ z (- y z))) (if (<= z 3.6e+89) (* (- y z) (/ x (- t z))) (* (- x) (+ (/ y z) -1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.4e+216) {
tmp = -x / (z / (y - z));
} else if (z <= 3.6e+89) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = -x * ((y / z) + -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 <= (-5.4d+216)) then
tmp = -x / (z / (y - z))
else if (z <= 3.6d+89) then
tmp = (y - z) * (x / (t - z))
else
tmp = -x * ((y / z) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.4e+216) {
tmp = -x / (z / (y - z));
} else if (z <= 3.6e+89) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = -x * ((y / z) + -1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.4e+216: tmp = -x / (z / (y - z)) elif z <= 3.6e+89: tmp = (y - z) * (x / (t - z)) else: tmp = -x * ((y / z) + -1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.4e+216) tmp = Float64(Float64(-x) / Float64(z / Float64(y - z))); elseif (z <= 3.6e+89) tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z))); else tmp = Float64(Float64(-x) * Float64(Float64(y / z) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.4e+216) tmp = -x / (z / (y - z)); elseif (z <= 3.6e+89) tmp = (y - z) * (x / (t - z)); else tmp = -x * ((y / z) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.4e+216], N[((-x) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+89], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) * N[(N[(y / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+216}:\\
\;\;\;\;\frac{-x}{\frac{z}{y - z}}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+89}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left(\frac{y}{z} + -1\right)\\
\end{array}
\end{array}
if z < -5.4000000000000003e216Initial program 60.2%
associate-*l/55.4%
Simplified55.4%
Taylor expanded in t around 0 60.2%
mul-1-neg60.2%
associate-/l*99.9%
distribute-neg-frac99.9%
Simplified99.9%
if -5.4000000000000003e216 < z < 3.6e89Initial program 89.8%
associate-*l/94.1%
Simplified94.1%
if 3.6e89 < z Initial program 66.3%
*-commutative66.3%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 84.2%
mul-1-neg84.2%
div-sub84.3%
sub-neg84.3%
*-inverses84.3%
metadata-eval84.3%
Simplified84.3%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (<= t -1.5e-7) (* (- y z) (/ x t)) (if (<= t 8.5e-90) (* (- x) (+ (/ y z) -1.0)) (/ x (/ t (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.5e-7) {
tmp = (y - z) * (x / t);
} else if (t <= 8.5e-90) {
tmp = -x * ((y / z) + -1.0);
} else {
tmp = x / (t / (y - z));
}
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.5d-7)) then
tmp = (y - z) * (x / t)
else if (t <= 8.5d-90) then
tmp = -x * ((y / z) + (-1.0d0))
else
tmp = x / (t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.5e-7) {
tmp = (y - z) * (x / t);
} else if (t <= 8.5e-90) {
tmp = -x * ((y / z) + -1.0);
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.5e-7: tmp = (y - z) * (x / t) elif t <= 8.5e-90: tmp = -x * ((y / z) + -1.0) else: tmp = x / (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.5e-7) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (t <= 8.5e-90) tmp = Float64(Float64(-x) * Float64(Float64(y / z) + -1.0)); else tmp = Float64(x / Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.5e-7) tmp = (y - z) * (x / t); elseif (t <= 8.5e-90) tmp = -x * ((y / z) + -1.0); else tmp = x / (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.5e-7], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-90], N[((-x) * N[(N[(y / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-7}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-90}:\\
\;\;\;\;\left(-x\right) \cdot \left(\frac{y}{z} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\end{array}
\end{array}
if t < -1.4999999999999999e-7Initial program 85.9%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in t around inf 71.1%
associate-/l*73.6%
associate-/r/75.5%
Applied egg-rr75.5%
if -1.4999999999999999e-7 < t < 8.5000000000000001e-90Initial program 81.7%
*-commutative81.7%
associate-*l/96.3%
Applied egg-rr96.3%
Taylor expanded in t around 0 84.0%
mul-1-neg84.0%
div-sub84.0%
sub-neg84.0%
*-inverses84.0%
metadata-eval84.0%
Simplified84.0%
if 8.5000000000000001e-90 < t Initial program 85.7%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in t around inf 71.6%
associate-/l*76.2%
Simplified76.2%
Final simplification79.2%
(FPCore (x y z t) :precision binary64 (if (<= z -6.6e+110) x (if (<= z 6.2e+91) (* y (/ x (- t z))) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.6e+110) {
tmp = x;
} else if (z <= 6.2e+91) {
tmp = y * (x / (t - z));
} else {
tmp = 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.6d+110)) then
tmp = x
else if (z <= 6.2d+91) then
tmp = y * (x / (t - z))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.6e+110) {
tmp = x;
} else if (z <= 6.2e+91) {
tmp = y * (x / (t - z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.6e+110: tmp = x elif z <= 6.2e+91: tmp = y * (x / (t - z)) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.6e+110) tmp = x; elseif (z <= 6.2e+91) tmp = Float64(y * Float64(x / Float64(t - z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.6e+110) tmp = x; elseif (z <= 6.2e+91) tmp = y * (x / (t - z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.6e+110], x, If[LessEqual[z, 6.2e+91], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+91}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.59999999999999942e110 or 6.19999999999999995e91 < z Initial program 71.5%
associate-*l/71.1%
Simplified71.1%
Taylor expanded in z around inf 63.1%
if -6.59999999999999942e110 < z < 6.19999999999999995e91Initial program 90.1%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in y around inf 71.7%
associate-*l/72.7%
*-commutative72.7%
Simplified72.7%
Final simplification69.6%
(FPCore (x y z t) :precision binary64 (if (<= z -850000000000.0) x (if (<= z 1.4e+19) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -850000000000.0) {
tmp = x;
} else if (z <= 1.4e+19) {
tmp = y * (x / t);
} else {
tmp = 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 <= (-850000000000.0d0)) then
tmp = x
else if (z <= 1.4d+19) then
tmp = y * (x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -850000000000.0) {
tmp = x;
} else if (z <= 1.4e+19) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -850000000000.0: tmp = x elif z <= 1.4e+19: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -850000000000.0) tmp = x; elseif (z <= 1.4e+19) tmp = Float64(y * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -850000000000.0) tmp = x; elseif (z <= 1.4e+19) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -850000000000.0], x, If[LessEqual[z, 1.4e+19], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -850000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.5e11 or 1.4e19 < z Initial program 75.8%
associate-*l/77.8%
Simplified77.8%
Taylor expanded in z around inf 54.6%
if -8.5e11 < z < 1.4e19Initial program 91.5%
*-commutative91.5%
associate-*l/92.4%
Applied egg-rr92.4%
Taylor expanded in y around inf 78.8%
Taylor expanded in t around inf 66.0%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
Final simplification61.6%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 84.1%
associate-*l/86.9%
Simplified86.9%
Taylor expanded in z around inf 29.5%
Final simplification29.5%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024034
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))