
(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 14 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 (if (or (<= z -1.02e-13) (not (<= z 1.55e-231))) (* x (/ (- y z) (- t z))) (* (- y z) (/ x (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e-13) || !(z <= 1.55e-231)) {
tmp = x * ((y - z) / (t - z));
} else {
tmp = (y - z) * (x / (t - 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 ((z <= (-1.02d-13)) .or. (.not. (z <= 1.55d-231))) then
tmp = x * ((y - z) / (t - z))
else
tmp = (y - z) * (x / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e-13) || !(z <= 1.55e-231)) {
tmp = x * ((y - z) / (t - z));
} else {
tmp = (y - z) * (x / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.02e-13) or not (z <= 1.55e-231): tmp = x * ((y - z) / (t - z)) else: tmp = (y - z) * (x / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.02e-13) || !(z <= 1.55e-231)) tmp = Float64(x * Float64(Float64(y - z) / Float64(t - z))); else tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.02e-13) || ~((z <= 1.55e-231))) tmp = x * ((y - z) / (t - z)); else tmp = (y - z) * (x / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.02e-13], N[Not[LessEqual[z, 1.55e-231]], $MachinePrecision]], N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-13} \lor \neg \left(z \leq 1.55 \cdot 10^{-231}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if z < -1.0199999999999999e-13 or 1.54999999999999994e-231 < z Initial program 76.5%
*-commutative76.5%
associate-*l/99.3%
*-commutative99.3%
Simplified99.3%
if -1.0199999999999999e-13 < z < 1.54999999999999994e-231Initial program 87.3%
associate-*l/99.1%
Simplified99.1%
Final simplification99.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -3.8e+24)
x
(if (<= z -1.05e-232)
t_1
(if (<= z 1.52e-295)
(* (- y z) (/ x t))
(if (<= z 2.6e-100)
t_1
(if (<= z 8.5e+49) (* x (/ (- y z) t)) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -3.8e+24) {
tmp = x;
} else if (z <= -1.05e-232) {
tmp = t_1;
} else if (z <= 1.52e-295) {
tmp = (y - z) * (x / t);
} else if (z <= 2.6e-100) {
tmp = t_1;
} else if (z <= 8.5e+49) {
tmp = x * ((y - z) / 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-3.8d+24)) then
tmp = x
else if (z <= (-1.05d-232)) then
tmp = t_1
else if (z <= 1.52d-295) then
tmp = (y - z) * (x / t)
else if (z <= 2.6d-100) then
tmp = t_1
else if (z <= 8.5d+49) then
tmp = x * ((y - z) / t)
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 <= -3.8e+24) {
tmp = x;
} else if (z <= -1.05e-232) {
tmp = t_1;
} else if (z <= 1.52e-295) {
tmp = (y - z) * (x / t);
} else if (z <= 2.6e-100) {
tmp = t_1;
} else if (z <= 8.5e+49) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -3.8e+24: tmp = x elif z <= -1.05e-232: tmp = t_1 elif z <= 1.52e-295: tmp = (y - z) * (x / t) elif z <= 2.6e-100: tmp = t_1 elif z <= 8.5e+49: tmp = x * ((y - z) / t) 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 <= -3.8e+24) tmp = x; elseif (z <= -1.05e-232) tmp = t_1; elseif (z <= 1.52e-295) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 2.6e-100) tmp = t_1; elseif (z <= 8.5e+49) tmp = Float64(x * Float64(Float64(y - z) / t)); 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 <= -3.8e+24) tmp = x; elseif (z <= -1.05e-232) tmp = t_1; elseif (z <= 1.52e-295) tmp = (y - z) * (x / t); elseif (z <= 2.6e-100) tmp = t_1; elseif (z <= 8.5e+49) tmp = x * ((y - z) / t); 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, -3.8e+24], x, If[LessEqual[z, -1.05e-232], t$95$1, If[LessEqual[z, 1.52e-295], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-100], t$95$1, If[LessEqual[z, 8.5e+49], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-232}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-295}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.80000000000000015e24 or 8.4999999999999996e49 < z Initial program 65.8%
*-commutative65.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -3.80000000000000015e24 < z < -1.05e-232 or 1.5200000000000001e-295 < z < 2.5999999999999998e-100Initial program 88.7%
*-commutative88.7%
associate-*l/93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around inf 77.8%
if -1.05e-232 < z < 1.5200000000000001e-295Initial program 95.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
if 2.5999999999999998e-100 < z < 8.4999999999999996e49Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.8%
Final simplification75.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.5e+24)
x
(if (<= z -9.2e-229)
(/ x (/ (- t z) y))
(if (<= z 1.5e-296)
(* (- y z) (/ x t))
(if (<= z 5.5e-103)
(* x (/ y (- t z)))
(if (<= z 1.4e+50) (* x (/ (- y z) t)) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+24) {
tmp = x;
} else if (z <= -9.2e-229) {
tmp = x / ((t - z) / y);
} else if (z <= 1.5e-296) {
tmp = (y - z) * (x / t);
} else if (z <= 5.5e-103) {
tmp = x * (y / (t - z));
} else if (z <= 1.4e+50) {
tmp = x * ((y - z) / 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 <= (-3.5d+24)) then
tmp = x
else if (z <= (-9.2d-229)) then
tmp = x / ((t - z) / y)
else if (z <= 1.5d-296) then
tmp = (y - z) * (x / t)
else if (z <= 5.5d-103) then
tmp = x * (y / (t - z))
else if (z <= 1.4d+50) then
tmp = x * ((y - z) / 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 <= -3.5e+24) {
tmp = x;
} else if (z <= -9.2e-229) {
tmp = x / ((t - z) / y);
} else if (z <= 1.5e-296) {
tmp = (y - z) * (x / t);
} else if (z <= 5.5e-103) {
tmp = x * (y / (t - z));
} else if (z <= 1.4e+50) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.5e+24: tmp = x elif z <= -9.2e-229: tmp = x / ((t - z) / y) elif z <= 1.5e-296: tmp = (y - z) * (x / t) elif z <= 5.5e-103: tmp = x * (y / (t - z)) elif z <= 1.4e+50: tmp = x * ((y - z) / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+24) tmp = x; elseif (z <= -9.2e-229) tmp = Float64(x / Float64(Float64(t - z) / y)); elseif (z <= 1.5e-296) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 5.5e-103) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 1.4e+50) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.5e+24) tmp = x; elseif (z <= -9.2e-229) tmp = x / ((t - z) / y); elseif (z <= 1.5e-296) tmp = (y - z) * (x / t); elseif (z <= 5.5e-103) tmp = x * (y / (t - z)); elseif (z <= 1.4e+50) tmp = x * ((y - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+24], x, If[LessEqual[z, -9.2e-229], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-296], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-103], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+50], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-229}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-296}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.5000000000000002e24 or 1.3999999999999999e50 < z Initial program 65.8%
*-commutative65.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -3.5000000000000002e24 < z < -9.19999999999999983e-229Initial program 91.8%
*-commutative91.8%
associate-*l/92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y around inf 72.6%
associate-/l*77.0%
Simplified77.0%
if -9.19999999999999983e-229 < z < 1.4999999999999999e-296Initial program 95.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
if 1.4999999999999999e-296 < z < 5.50000000000000032e-103Initial program 84.4%
*-commutative84.4%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around inf 82.4%
if 5.50000000000000032e-103 < z < 1.3999999999999999e50Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.8%
Final simplification76.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (- z y))))
(if (<= z -6.6e+156)
x
(if (<= z -3.8e-6)
t_1
(if (<= z 1.6e-103)
(/ y (/ (- t z) x))
(if (<= z 6.8e+49)
(/ (* x (- y z)) t)
(if (<= z 3.4e+161) t_1 x)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (z - y);
double tmp;
if (z <= -6.6e+156) {
tmp = x;
} else if (z <= -3.8e-6) {
tmp = t_1;
} else if (z <= 1.6e-103) {
tmp = y / ((t - z) / x);
} else if (z <= 6.8e+49) {
tmp = (x * (y - z)) / t;
} else if (z <= 3.4e+161) {
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 / z) * (z - y)
if (z <= (-6.6d+156)) then
tmp = x
else if (z <= (-3.8d-6)) then
tmp = t_1
else if (z <= 1.6d-103) then
tmp = y / ((t - z) / x)
else if (z <= 6.8d+49) then
tmp = (x * (y - z)) / t
else if (z <= 3.4d+161) 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 / z) * (z - y);
double tmp;
if (z <= -6.6e+156) {
tmp = x;
} else if (z <= -3.8e-6) {
tmp = t_1;
} else if (z <= 1.6e-103) {
tmp = y / ((t - z) / x);
} else if (z <= 6.8e+49) {
tmp = (x * (y - z)) / t;
} else if (z <= 3.4e+161) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) * (z - y) tmp = 0 if z <= -6.6e+156: tmp = x elif z <= -3.8e-6: tmp = t_1 elif z <= 1.6e-103: tmp = y / ((t - z) / x) elif z <= 6.8e+49: tmp = (x * (y - z)) / t elif z <= 3.4e+161: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(z - y)) tmp = 0.0 if (z <= -6.6e+156) tmp = x; elseif (z <= -3.8e-6) tmp = t_1; elseif (z <= 1.6e-103) tmp = Float64(y / Float64(Float64(t - z) / x)); elseif (z <= 6.8e+49) tmp = Float64(Float64(x * Float64(y - z)) / t); elseif (z <= 3.4e+161) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) * (z - y); tmp = 0.0; if (z <= -6.6e+156) tmp = x; elseif (z <= -3.8e-6) tmp = t_1; elseif (z <= 1.6e-103) tmp = y / ((t - z) / x); elseif (z <= 6.8e+49) tmp = (x * (y - z)) / t; elseif (z <= 3.4e+161) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+156], x, If[LessEqual[z, -3.8e-6], t$95$1, If[LessEqual[z, 1.6e-103], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+49], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.4e+161], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+156}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-103}:\\
\;\;\;\;\frac{y}{\frac{t - z}{x}}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+161}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.5999999999999997e156 or 3.39999999999999993e161 < z Initial program 58.3%
*-commutative58.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 84.5%
if -6.5999999999999997e156 < z < -3.8e-6 or 6.8000000000000001e49 < z < 3.39999999999999993e161Initial program 81.1%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in t around 0 67.8%
associate-*r/67.8%
neg-mul-167.8%
Simplified67.8%
if -3.8e-6 < z < 1.59999999999999988e-103Initial program 89.5%
*-commutative89.5%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 75.5%
*-commutative75.5%
associate-/l*81.6%
add-cube-cbrt80.8%
*-un-lft-identity80.8%
times-frac80.8%
pow280.8%
Applied egg-rr80.8%
/-rgt-identity80.8%
associate-*r/80.8%
unpow280.8%
rem-3cbrt-lft81.6%
Simplified81.6%
if 1.59999999999999988e-103 < z < 6.8000000000000001e49Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.9%
Final simplification79.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -3.8e+24)
x
(if (<= z 1.4e-36)
t_1
(if (<= z 2.7e+49) (/ (- x) (/ t z)) (if (<= z 7.8e+160) t_1 x))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -3.8e+24) {
tmp = x;
} else if (z <= 1.4e-36) {
tmp = t_1;
} else if (z <= 2.7e+49) {
tmp = -x / (t / z);
} else if (z <= 7.8e+160) {
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 <= (-3.8d+24)) then
tmp = x
else if (z <= 1.4d-36) then
tmp = t_1
else if (z <= 2.7d+49) then
tmp = -x / (t / z)
else if (z <= 7.8d+160) 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 <= -3.8e+24) {
tmp = x;
} else if (z <= 1.4e-36) {
tmp = t_1;
} else if (z <= 2.7e+49) {
tmp = -x / (t / z);
} else if (z <= 7.8e+160) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -3.8e+24: tmp = x elif z <= 1.4e-36: tmp = t_1 elif z <= 2.7e+49: tmp = -x / (t / z) elif z <= 7.8e+160: 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 <= -3.8e+24) tmp = x; elseif (z <= 1.4e-36) tmp = t_1; elseif (z <= 2.7e+49) tmp = Float64(Float64(-x) / Float64(t / z)); elseif (z <= 7.8e+160) 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 <= -3.8e+24) tmp = x; elseif (z <= 1.4e-36) tmp = t_1; elseif (z <= 2.7e+49) tmp = -x / (t / z); elseif (z <= 7.8e+160) 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, -3.8e+24], x, If[LessEqual[z, 1.4e-36], t$95$1, If[LessEqual[z, 2.7e+49], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+160], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+49}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.80000000000000015e24 or 7.80000000000000014e160 < z Initial program 63.3%
*-commutative63.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 74.6%
if -3.80000000000000015e24 < z < 1.4000000000000001e-36 or 2.7000000000000001e49 < z < 7.80000000000000014e160Initial program 89.1%
*-commutative89.1%
associate-*l/92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in y around inf 73.9%
if 1.4000000000000001e-36 < z < 2.7000000000000001e49Initial program 93.6%
*-commutative93.6%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around 0 75.5%
mul-1-neg75.5%
associate-/l*75.4%
distribute-neg-frac75.4%
Simplified75.4%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.3e+23)
x
(if (<= z 1.5e-103)
(* x (/ y (- t z)))
(if (<= z 8.5e+49) (* x (/ (- y z) t)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.3e+23) {
tmp = x;
} else if (z <= 1.5e-103) {
tmp = x * (y / (t - z));
} else if (z <= 8.5e+49) {
tmp = x * ((y - z) / 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 <= (-2.3d+23)) then
tmp = x
else if (z <= 1.5d-103) then
tmp = x * (y / (t - z))
else if (z <= 8.5d+49) then
tmp = x * ((y - z) / 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 <= -2.3e+23) {
tmp = x;
} else if (z <= 1.5e-103) {
tmp = x * (y / (t - z));
} else if (z <= 8.5e+49) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.3e+23: tmp = x elif z <= 1.5e-103: tmp = x * (y / (t - z)) elif z <= 8.5e+49: tmp = x * ((y - z) / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.3e+23) tmp = x; elseif (z <= 1.5e-103) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 8.5e+49) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.3e+23) tmp = x; elseif (z <= 1.5e-103) tmp = x * (y / (t - z)); elseif (z <= 8.5e+49) tmp = x * ((y - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.3e+23], x, If[LessEqual[z, 1.5e-103], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+49], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.3e23 or 8.4999999999999996e49 < z Initial program 65.8%
*-commutative65.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -2.3e23 < z < 1.5e-103Initial program 89.8%
*-commutative89.8%
associate-*l/91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y around inf 77.7%
if 1.5e-103 < z < 8.4999999999999996e49Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.8%
Final simplification74.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.8e+24)
x
(if (<= z 5.6e-100)
(/ y (/ (- t z) x))
(if (<= z 3.8e+49) (* x (/ (- y z) t)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+24) {
tmp = x;
} else if (z <= 5.6e-100) {
tmp = y / ((t - z) / x);
} else if (z <= 3.8e+49) {
tmp = x * ((y - z) / 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 <= (-3.8d+24)) then
tmp = x
else if (z <= 5.6d-100) then
tmp = y / ((t - z) / x)
else if (z <= 3.8d+49) then
tmp = x * ((y - z) / 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 <= -3.8e+24) {
tmp = x;
} else if (z <= 5.6e-100) {
tmp = y / ((t - z) / x);
} else if (z <= 3.8e+49) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.8e+24: tmp = x elif z <= 5.6e-100: tmp = y / ((t - z) / x) elif z <= 3.8e+49: tmp = x * ((y - z) / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.8e+24) tmp = x; elseif (z <= 5.6e-100) tmp = Float64(y / Float64(Float64(t - z) / x)); elseif (z <= 3.8e+49) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.8e+24) tmp = x; elseif (z <= 5.6e-100) tmp = y / ((t - z) / x); elseif (z <= 3.8e+49) tmp = x * ((y - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.8e+24], x, If[LessEqual[z, 5.6e-100], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+49], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-100}:\\
\;\;\;\;\frac{y}{\frac{t - z}{x}}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.80000000000000015e24 or 3.7999999999999999e49 < z Initial program 65.8%
*-commutative65.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -3.80000000000000015e24 < z < 5.59999999999999991e-100Initial program 89.8%
*-commutative89.8%
associate-*l/91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y around inf 75.3%
*-commutative75.3%
associate-/l*81.3%
add-cube-cbrt80.5%
*-un-lft-identity80.5%
times-frac80.5%
pow280.5%
Applied egg-rr80.5%
/-rgt-identity80.5%
associate-*r/80.5%
unpow280.5%
rem-3cbrt-lft81.3%
Simplified81.3%
if 5.59999999999999991e-100 < z < 3.7999999999999999e49Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.8%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -8.5e+23)
x
(if (<= z 3.5e-117)
(/ y (/ (- t z) x))
(if (<= z 1.35e+50) (/ (* x (- y z)) t) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.5e+23) {
tmp = x;
} else if (z <= 3.5e-117) {
tmp = y / ((t - z) / x);
} else if (z <= 1.35e+50) {
tmp = (x * (y - z)) / 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 <= (-8.5d+23)) then
tmp = x
else if (z <= 3.5d-117) then
tmp = y / ((t - z) / x)
else if (z <= 1.35d+50) then
tmp = (x * (y - z)) / 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 <= -8.5e+23) {
tmp = x;
} else if (z <= 3.5e-117) {
tmp = y / ((t - z) / x);
} else if (z <= 1.35e+50) {
tmp = (x * (y - z)) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.5e+23: tmp = x elif z <= 3.5e-117: tmp = y / ((t - z) / x) elif z <= 1.35e+50: tmp = (x * (y - z)) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.5e+23) tmp = x; elseif (z <= 3.5e-117) tmp = Float64(y / Float64(Float64(t - z) / x)); elseif (z <= 1.35e+50) tmp = Float64(Float64(x * Float64(y - z)) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -8.5e+23) tmp = x; elseif (z <= 3.5e-117) tmp = y / ((t - z) / x); elseif (z <= 1.35e+50) tmp = (x * (y - z)) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.5e+23], x, If[LessEqual[z, 3.5e-117], N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+50], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-117}:\\
\;\;\;\;\frac{y}{\frac{t - z}{x}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+50}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.5000000000000001e23 or 1.35e50 < z Initial program 65.8%
*-commutative65.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -8.5000000000000001e23 < z < 3.4999999999999998e-117Initial program 89.8%
*-commutative89.8%
associate-*l/91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y around inf 75.3%
*-commutative75.3%
associate-/l*81.3%
add-cube-cbrt80.5%
*-un-lft-identity80.5%
times-frac80.5%
pow280.5%
Applied egg-rr80.5%
/-rgt-identity80.5%
associate-*r/80.5%
unpow280.5%
rem-3cbrt-lft81.3%
Simplified81.3%
if 3.4999999999999998e-117 < z < 1.35e50Initial program 93.0%
*-commutative93.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 77.9%
Final simplification75.9%
(FPCore (x y z t) :precision binary64 (if (<= z -4.8e-8) x (if (<= z 3.1e-37) (* y (/ x t)) (if (<= z 1.6e+50) (* x (/ (- z) t)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e-8) {
tmp = x;
} else if (z <= 3.1e-37) {
tmp = y * (x / t);
} else if (z <= 1.6e+50) {
tmp = x * (-z / 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 <= (-4.8d-8)) then
tmp = x
else if (z <= 3.1d-37) then
tmp = y * (x / t)
else if (z <= 1.6d+50) then
tmp = x * (-z / 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 <= -4.8e-8) {
tmp = x;
} else if (z <= 3.1e-37) {
tmp = y * (x / t);
} else if (z <= 1.6e+50) {
tmp = x * (-z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.8e-8: tmp = x elif z <= 3.1e-37: tmp = y * (x / t) elif z <= 1.6e+50: tmp = x * (-z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.8e-8) tmp = x; elseif (z <= 3.1e-37) tmp = Float64(y * Float64(x / t)); elseif (z <= 1.6e+50) tmp = Float64(x * Float64(Float64(-z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.8e-8) tmp = x; elseif (z <= 3.1e-37) tmp = y * (x / t); elseif (z <= 1.6e+50) tmp = x * (-z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.8e-8], x, If[LessEqual[z, 3.1e-37], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+50], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.79999999999999997e-8 or 1.59999999999999991e50 < z Initial program 67.0%
*-commutative67.0%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 67.5%
if -4.79999999999999997e-8 < z < 3.09999999999999993e-37Initial program 89.8%
*-commutative89.8%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
add-cube-cbrt90.6%
pow390.6%
Applied egg-rr90.6%
Taylor expanded in z around 0 58.5%
pow-base-158.5%
*-lft-identity58.5%
associate-/l*61.6%
associate-/r/63.5%
Simplified63.5%
if 3.09999999999999993e-37 < z < 1.59999999999999991e50Initial program 93.6%
*-commutative93.6%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around 0 75.3%
neg-mul-175.3%
Simplified75.3%
Final simplification65.9%
(FPCore (x y z t) :precision binary64 (if (<= z -6e-8) x (if (<= z 2.25e-37) (* y (/ x t)) (if (<= z 1.7e+50) (/ (- x) (/ t z)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6e-8) {
tmp = x;
} else if (z <= 2.25e-37) {
tmp = y * (x / t);
} else if (z <= 1.7e+50) {
tmp = -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 <= (-6d-8)) then
tmp = x
else if (z <= 2.25d-37) then
tmp = y * (x / t)
else if (z <= 1.7d+50) then
tmp = -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 <= -6e-8) {
tmp = x;
} else if (z <= 2.25e-37) {
tmp = y * (x / t);
} else if (z <= 1.7e+50) {
tmp = -x / (t / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6e-8: tmp = x elif z <= 2.25e-37: tmp = y * (x / t) elif z <= 1.7e+50: tmp = -x / (t / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6e-8) tmp = x; elseif (z <= 2.25e-37) tmp = Float64(y * Float64(x / t)); elseif (z <= 1.7e+50) tmp = Float64(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 <= -6e-8) tmp = x; elseif (z <= 2.25e-37) tmp = y * (x / t); elseif (z <= 1.7e+50) tmp = -x / (t / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6e-8], x, If[LessEqual[z, 2.25e-37], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+50], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.99999999999999946e-8 or 1.6999999999999999e50 < z Initial program 67.0%
*-commutative67.0%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 67.5%
if -5.99999999999999946e-8 < z < 2.2500000000000002e-37Initial program 89.8%
*-commutative89.8%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
add-cube-cbrt90.6%
pow390.6%
Applied egg-rr90.6%
Taylor expanded in z around 0 58.5%
pow-base-158.5%
*-lft-identity58.5%
associate-/l*61.6%
associate-/r/63.5%
Simplified63.5%
if 2.2500000000000002e-37 < z < 1.6999999999999999e50Initial program 93.6%
*-commutative93.6%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around 0 75.5%
mul-1-neg75.5%
associate-/l*75.4%
distribute-neg-frac75.4%
Simplified75.4%
Final simplification65.9%
(FPCore (x y z t) :precision binary64 (if (<= z -165000000.0) x (if (<= z 5.1e-20) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -165000000.0) {
tmp = x;
} else if (z <= 5.1e-20) {
tmp = x * (y / 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 <= (-165000000.0d0)) then
tmp = x
else if (z <= 5.1d-20) then
tmp = x * (y / 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 <= -165000000.0) {
tmp = x;
} else if (z <= 5.1e-20) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -165000000.0: tmp = x elif z <= 5.1e-20: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -165000000.0) tmp = x; elseif (z <= 5.1e-20) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -165000000.0) tmp = x; elseif (z <= 5.1e-20) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -165000000.0], x, If[LessEqual[z, 5.1e-20], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -165000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-20}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.65e8 or 5.10000000000000019e-20 < z Initial program 68.7%
*-commutative68.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 63.5%
if -1.65e8 < z < 5.10000000000000019e-20Initial program 90.2%
*-commutative90.2%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in z around 0 61.3%
Final simplification62.3%
(FPCore (x y z t) :precision binary64 (if (<= z -1.05e-7) x (if (<= z 9.6e-20) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05e-7) {
tmp = x;
} else if (z <= 9.6e-20) {
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 <= (-1.05d-7)) then
tmp = x
else if (z <= 9.6d-20) 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 <= -1.05e-7) {
tmp = x;
} else if (z <= 9.6e-20) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.05e-7: tmp = x elif z <= 9.6e-20: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.05e-7) tmp = x; elseif (z <= 9.6e-20) 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 <= -1.05e-7) tmp = x; elseif (z <= 9.6e-20) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05e-7], x, If[LessEqual[z, 9.6e-20], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-20}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.05e-7 or 9.59999999999999971e-20 < z Initial program 69.0%
*-commutative69.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 63.0%
if -1.05e-7 < z < 9.59999999999999971e-20Initial program 90.1%
*-commutative90.1%
associate-*l/92.0%
*-commutative92.0%
Simplified92.0%
add-cube-cbrt90.9%
pow390.9%
Applied egg-rr90.9%
Taylor expanded in z around 0 57.9%
pow-base-157.9%
*-lft-identity57.9%
associate-/l*60.9%
associate-/r/62.7%
Simplified62.7%
Final simplification62.9%
(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(x * Float64(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[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 80.3%
*-commutative80.3%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Final simplification95.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 80.3%
*-commutative80.3%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in z around inf 35.6%
Final simplification35.6%
(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 2024021
(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)))