
(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 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(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
(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{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 91.5%
associate-/r*97.7%
div-inv97.6%
Applied egg-rr97.6%
un-div-inv97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- x) (* z (- y z)))))
(if (<= t -8.2e-187)
(/ (/ x (- t z)) y)
(if (<= t 2.4e-141)
t_1
(if (<= t 5.6e-63)
(/ (/ x (- y z)) t)
(if (<= t 2.7e-11)
t_1
(if (<= t 2e+220) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = -x / (z * (y - z));
double tmp;
if (t <= -8.2e-187) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.4e-141) {
tmp = t_1;
} else if (t <= 5.6e-63) {
tmp = (x / (y - z)) / t;
} else if (t <= 2.7e-11) {
tmp = t_1;
} else if (t <= 2e+220) {
tmp = x / ((y - z) * t);
} 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) :: t_1
real(8) :: tmp
t_1 = -x / (z * (y - z))
if (t <= (-8.2d-187)) then
tmp = (x / (t - z)) / y
else if (t <= 2.4d-141) then
tmp = t_1
else if (t <= 5.6d-63) then
tmp = (x / (y - z)) / t
else if (t <= 2.7d-11) then
tmp = t_1
else if (t <= 2d+220) then
tmp = x / ((y - z) * t)
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 t_1 = -x / (z * (y - z));
double tmp;
if (t <= -8.2e-187) {
tmp = (x / (t - z)) / y;
} else if (t <= 2.4e-141) {
tmp = t_1;
} else if (t <= 5.6e-63) {
tmp = (x / (y - z)) / t;
} else if (t <= 2.7e-11) {
tmp = t_1;
} else if (t <= 2e+220) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = -x / (z * (y - z)) tmp = 0 if t <= -8.2e-187: tmp = (x / (t - z)) / y elif t <= 2.4e-141: tmp = t_1 elif t <= 5.6e-63: tmp = (x / (y - z)) / t elif t <= 2.7e-11: tmp = t_1 elif t <= 2e+220: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-x) / Float64(z * Float64(y - z))) tmp = 0.0 if (t <= -8.2e-187) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 2.4e-141) tmp = t_1; elseif (t <= 5.6e-63) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (t <= 2.7e-11) tmp = t_1; elseif (t <= 2e+220) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -x / (z * (y - z)); tmp = 0.0; if (t <= -8.2e-187) tmp = (x / (t - z)) / y; elseif (t <= 2.4e-141) tmp = t_1; elseif (t <= 5.6e-63) tmp = (x / (y - z)) / t; elseif (t <= 2.7e-11) tmp = t_1; elseif (t <= 2e+220) tmp = x / ((y - z) * t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-187], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.4e-141], t$95$1, If[LessEqual[t, 5.6e-63], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.7e-11], t$95$1, If[LessEqual[t, 2e+220], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-187}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-141}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+220}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -8.2000000000000004e-187Initial program 94.3%
Taylor expanded in y around inf 71.3%
*-commutative71.3%
associate-/r*77.1%
Simplified77.1%
if -8.2000000000000004e-187 < t < 2.4000000000000001e-141 or 5.6000000000000005e-63 < t < 2.70000000000000005e-11Initial program 89.3%
Taylor expanded in t around 0 77.7%
associate-*r/77.7%
neg-mul-177.7%
Simplified77.7%
if 2.4000000000000001e-141 < t < 5.6000000000000005e-63Initial program 99.9%
associate-/r*92.0%
div-inv91.7%
Applied egg-rr91.7%
un-div-inv92.0%
Applied egg-rr92.0%
Taylor expanded in t around inf 60.5%
*-commutative60.5%
associate-/r*68.0%
Simplified68.0%
if 2.70000000000000005e-11 < t < 2e220Initial program 93.7%
Taylor expanded in t around inf 89.6%
if 2e220 < t Initial program 74.1%
associate-/r*94.3%
div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.1%
associate-/r*92.1%
Simplified92.1%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.6e-27)
(/ (/ x (- t z)) y)
(if (<= y -1.8e-141)
(/ x (* (- y z) t))
(if (<= y 2.9e-199)
(/ (- (/ x z)) (- t z))
(/ 1.0 (* t (/ (- y z) x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e-27) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.8e-141) {
tmp = x / ((y - z) * t);
} else if (y <= 2.9e-199) {
tmp = -(x / z) / (t - z);
} else {
tmp = 1.0 / (t * ((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 (y <= (-1.6d-27)) then
tmp = (x / (t - z)) / y
else if (y <= (-1.8d-141)) then
tmp = x / ((y - z) * t)
else if (y <= 2.9d-199) then
tmp = -(x / z) / (t - z)
else
tmp = 1.0d0 / (t * ((y - z) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e-27) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.8e-141) {
tmp = x / ((y - z) * t);
} else if (y <= 2.9e-199) {
tmp = -(x / z) / (t - z);
} else {
tmp = 1.0 / (t * ((y - z) / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.6e-27: tmp = (x / (t - z)) / y elif y <= -1.8e-141: tmp = x / ((y - z) * t) elif y <= 2.9e-199: tmp = -(x / z) / (t - z) else: tmp = 1.0 / (t * ((y - z) / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.6e-27) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -1.8e-141) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 2.9e-199) tmp = Float64(Float64(-Float64(x / z)) / Float64(t - z)); else tmp = Float64(1.0 / Float64(t * Float64(Float64(y - z) / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.6e-27) tmp = (x / (t - z)) / y; elseif (y <= -1.8e-141) tmp = x / ((y - z) * t); elseif (y <= 2.9e-199) tmp = -(x / z) / (t - z); else tmp = 1.0 / (t * ((y - z) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.6e-27], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.8e-141], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-199], N[((-N[(x / z), $MachinePrecision]) / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t * N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-141}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-199}:\\
\;\;\;\;\frac{-\frac{x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y - z}{x}}\\
\end{array}
\end{array}
if y < -1.59999999999999995e-27Initial program 90.5%
Taylor expanded in y around inf 84.7%
*-commutative84.7%
associate-/r*89.8%
Simplified89.8%
if -1.59999999999999995e-27 < y < -1.80000000000000007e-141Initial program 99.5%
Taylor expanded in t around inf 96.1%
if -1.80000000000000007e-141 < y < 2.9e-199Initial program 86.2%
associate-/r*98.3%
div-inv98.1%
Applied egg-rr98.1%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in y around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 2.9e-199 < y Initial program 93.5%
associate-/r*97.0%
div-inv96.9%
Applied egg-rr96.9%
clear-num96.5%
frac-times96.1%
metadata-eval96.1%
Applied egg-rr96.1%
Taylor expanded in t around inf 59.3%
associate-*r/67.7%
Simplified67.7%
Final simplification80.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.5e-27)
(/ (/ x (- t z)) y)
(if (<= y -2.9e-141)
(/ x (* (- y z) t))
(if (<= y 4.2e-203) (/ (- (/ x z)) (- t z)) (/ (/ x (- y z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-27) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.9e-141) {
tmp = x / ((y - z) * t);
} else if (y <= 4.2e-203) {
tmp = -(x / z) / (t - z);
} else {
tmp = (x / (y - z)) / 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 (y <= (-9.5d-27)) then
tmp = (x / (t - z)) / y
else if (y <= (-2.9d-141)) then
tmp = x / ((y - z) * t)
else if (y <= 4.2d-203) then
tmp = -(x / z) / (t - z)
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-27) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.9e-141) {
tmp = x / ((y - z) * t);
} else if (y <= 4.2e-203) {
tmp = -(x / z) / (t - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e-27: tmp = (x / (t - z)) / y elif y <= -2.9e-141: tmp = x / ((y - z) * t) elif y <= 4.2e-203: tmp = -(x / z) / (t - z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e-27) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -2.9e-141) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 4.2e-203) tmp = Float64(Float64(-Float64(x / z)) / Float64(t - z)); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e-27) tmp = (x / (t - z)) / y; elseif (y <= -2.9e-141) tmp = x / ((y - z) * t); elseif (y <= 4.2e-203) tmp = -(x / z) / (t - z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e-27], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.9e-141], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-203], N[((-N[(x / z), $MachinePrecision]) / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-141}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-203}:\\
\;\;\;\;\frac{-\frac{x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -9.50000000000000037e-27Initial program 90.5%
Taylor expanded in y around inf 84.7%
*-commutative84.7%
associate-/r*89.8%
Simplified89.8%
if -9.50000000000000037e-27 < y < -2.9e-141Initial program 99.5%
Taylor expanded in t around inf 96.1%
if -2.9e-141 < y < 4.20000000000000004e-203Initial program 85.7%
associate-/r*98.2%
div-inv98.1%
Applied egg-rr98.1%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in y around 0 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
if 4.20000000000000004e-203 < y Initial program 93.6%
associate-/r*97.0%
div-inv97.0%
Applied egg-rr97.0%
un-div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in t around inf 59.4%
*-commutative59.4%
associate-/r*66.8%
Simplified66.8%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (* t (/ y x)))))
(if (<= t -4.4e-124)
t_1
(if (<= t 1.12e-215)
(/ (- x) (* y z))
(if (<= t 1.32e+60) t_1 (- (/ x (* z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (t <= -4.4e-124) {
tmp = t_1;
} else if (t <= 1.12e-215) {
tmp = -x / (y * z);
} else if (t <= 1.32e+60) {
tmp = t_1;
} else {
tmp = -(x / (z * 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (t * (y / x))
if (t <= (-4.4d-124)) then
tmp = t_1
else if (t <= 1.12d-215) then
tmp = -x / (y * z)
else if (t <= 1.32d+60) then
tmp = t_1
else
tmp = -(x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (t <= -4.4e-124) {
tmp = t_1;
} else if (t <= 1.12e-215) {
tmp = -x / (y * z);
} else if (t <= 1.32e+60) {
tmp = t_1;
} else {
tmp = -(x / (z * t));
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 / (t * (y / x)) tmp = 0 if t <= -4.4e-124: tmp = t_1 elif t <= 1.12e-215: tmp = -x / (y * z) elif t <= 1.32e+60: tmp = t_1 else: tmp = -(x / (z * t)) return tmp
function code(x, y, z, t) t_1 = Float64(1.0 / Float64(t * Float64(y / x))) tmp = 0.0 if (t <= -4.4e-124) tmp = t_1; elseif (t <= 1.12e-215) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 1.32e+60) tmp = t_1; else tmp = Float64(-Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 / (t * (y / x)); tmp = 0.0; if (t <= -4.4e-124) tmp = t_1; elseif (t <= 1.12e-215) tmp = -x / (y * z); elseif (t <= 1.32e+60) tmp = t_1; else tmp = -(x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-124], t$95$1, If[LessEqual[t, 1.12e-215], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e+60], t$95$1, (-N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-215}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{z \cdot t}\\
\end{array}
\end{array}
if t < -4.3999999999999998e-124 or 1.12e-215 < t < 1.32e60Initial program 96.9%
Taylor expanded in z around 0 53.5%
clear-num54.6%
inv-pow54.6%
*-commutative54.6%
associate-/l*55.8%
Applied egg-rr55.8%
unpow-155.8%
associate-/r/56.2%
Simplified56.2%
if -4.3999999999999998e-124 < t < 1.12e-215Initial program 84.2%
Taylor expanded in y around inf 60.8%
*-commutative60.8%
Simplified60.8%
Taylor expanded in t around 0 55.6%
associate-*r/55.6%
neg-mul-155.6%
*-commutative55.6%
Simplified55.6%
if 1.32e60 < t Initial program 86.7%
associate-/r*98.0%
div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in t around inf 86.6%
associate-/r*85.8%
Simplified85.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
Final simplification57.5%
(FPCore (x y z t)
:precision binary64
(if (<= t 7.5e-78)
(/ (/ x (- t z)) y)
(if (<= t 4e+219)
(/ x (* (- y z) t))
(if (<= t 7e+268) (/ (/ x t) (- y z)) (/ (/ x (- y z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 7.5e-78) {
tmp = (x / (t - z)) / y;
} else if (t <= 4e+219) {
tmp = x / ((y - z) * t);
} else if (t <= 7e+268) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / (y - z)) / 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 (t <= 7.5d-78) then
tmp = (x / (t - z)) / y
else if (t <= 4d+219) then
tmp = x / ((y - z) * t)
else if (t <= 7d+268) then
tmp = (x / t) / (y - z)
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 7.5e-78) {
tmp = (x / (t - z)) / y;
} else if (t <= 4e+219) {
tmp = x / ((y - z) * t);
} else if (t <= 7e+268) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 7.5e-78: tmp = (x / (t - z)) / y elif t <= 4e+219: tmp = x / ((y - z) * t) elif t <= 7e+268: tmp = (x / t) / (y - z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 7.5e-78) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 4e+219) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (t <= 7e+268) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 7.5e-78) tmp = (x / (t - z)) / y; elseif (t <= 4e+219) tmp = x / ((y - z) * t); elseif (t <= 7e+268) tmp = (x / t) / (y - z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 7.5e-78], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4e+219], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+268], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+219}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+268}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if t < 7.50000000000000041e-78Initial program 92.5%
Taylor expanded in y around inf 67.0%
*-commutative67.0%
associate-/r*73.5%
Simplified73.5%
if 7.50000000000000041e-78 < t < 3.99999999999999986e219Initial program 93.8%
Taylor expanded in t around inf 81.7%
if 3.99999999999999986e219 < t < 6.99999999999999945e268Initial program 66.4%
associate-/r*91.0%
div-inv91.1%
Applied egg-rr91.1%
Taylor expanded in t around inf 66.4%
associate-/r*95.5%
Simplified95.5%
if 6.99999999999999945e268 < t Initial program 86.3%
associate-/r*99.6%
div-inv99.6%
Applied egg-rr99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in t around inf 86.3%
*-commutative86.3%
associate-/r*99.6%
Simplified99.6%
Final simplification77.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ x z))))
(if (<= z -4.3e+86)
(/ t_1 (- y z))
(if (<= z 6.8e+128) (/ x (* (- y z) (- t z))) (/ t_1 (- t z))))))
double code(double x, double y, double z, double t) {
double t_1 = -(x / z);
double tmp;
if (z <= -4.3e+86) {
tmp = t_1 / (y - z);
} else if (z <= 6.8e+128) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = t_1 / (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) :: t_1
real(8) :: tmp
t_1 = -(x / z)
if (z <= (-4.3d+86)) then
tmp = t_1 / (y - z)
else if (z <= 6.8d+128) then
tmp = x / ((y - z) * (t - z))
else
tmp = t_1 / (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -(x / z);
double tmp;
if (z <= -4.3e+86) {
tmp = t_1 / (y - z);
} else if (z <= 6.8e+128) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = t_1 / (t - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = -(x / z) tmp = 0 if z <= -4.3e+86: tmp = t_1 / (y - z) elif z <= 6.8e+128: tmp = x / ((y - z) * (t - z)) else: tmp = t_1 / (t - z) return tmp
function code(x, y, z, t) t_1 = Float64(-Float64(x / z)) tmp = 0.0 if (z <= -4.3e+86) tmp = Float64(t_1 / Float64(y - z)); elseif (z <= 6.8e+128) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(t_1 / Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -(x / z); tmp = 0.0; if (z <= -4.3e+86) tmp = t_1 / (y - z); elseif (z <= 6.8e+128) tmp = x / ((y - z) * (t - z)); else tmp = t_1 / (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = (-N[(x / z), $MachinePrecision])}, If[LessEqual[z, -4.3e+86], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+128], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{x}{z}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+86}:\\
\;\;\;\;\frac{t_1}{y - z}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+128}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t - z}\\
\end{array}
\end{array}
if z < -4.3000000000000002e86Initial program 83.7%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 83.6%
associate-*r/83.6%
*-commutative83.6%
times-frac95.6%
associate-*l/95.6%
associate-*r/95.6%
neg-mul-195.6%
Simplified95.6%
if -4.3000000000000002e86 < z < 6.7999999999999997e128Initial program 94.8%
if 6.7999999999999997e128 < z Initial program 86.6%
associate-/r*100.0%
div-inv99.9%
Applied egg-rr99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 97.9%
associate-*r/97.9%
neg-mul-197.9%
Simplified97.9%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(if (<= t -3.4e-124)
(/ (/ x t) y)
(if (<= t 1.12e-219)
(/ (- x) (* y z))
(if (<= t 4.8e+58) (/ x (* y t)) (- (/ x (* z t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.4e-124) {
tmp = (x / t) / y;
} else if (t <= 1.12e-219) {
tmp = -x / (y * z);
} else if (t <= 4.8e+58) {
tmp = x / (y * t);
} else {
tmp = -(x / (z * 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 (t <= (-3.4d-124)) then
tmp = (x / t) / y
else if (t <= 1.12d-219) then
tmp = -x / (y * z)
else if (t <= 4.8d+58) then
tmp = x / (y * t)
else
tmp = -(x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.4e-124) {
tmp = (x / t) / y;
} else if (t <= 1.12e-219) {
tmp = -x / (y * z);
} else if (t <= 4.8e+58) {
tmp = x / (y * t);
} else {
tmp = -(x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.4e-124: tmp = (x / t) / y elif t <= 1.12e-219: tmp = -x / (y * z) elif t <= 4.8e+58: tmp = x / (y * t) else: tmp = -(x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.4e-124) tmp = Float64(Float64(x / t) / y); elseif (t <= 1.12e-219) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 4.8e+58) tmp = Float64(x / Float64(y * t)); else tmp = Float64(-Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3.4e-124) tmp = (x / t) / y; elseif (t <= 1.12e-219) tmp = -x / (y * z); elseif (t <= 4.8e+58) tmp = x / (y * t); else tmp = -(x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.4e-124], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.12e-219], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+58], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], (-N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision])]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-124}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-219}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+58}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{z \cdot t}\\
\end{array}
\end{array}
if t < -3.4000000000000001e-124Initial program 96.4%
associate-/r*98.8%
div-inv98.6%
Applied egg-rr98.6%
clear-num98.7%
frac-times98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in z around 0 59.3%
associate-/r*63.2%
Simplified63.2%
if -3.4000000000000001e-124 < t < 1.12e-219Initial program 83.7%
Taylor expanded in y around inf 59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in t around 0 55.6%
associate-*r/55.6%
neg-mul-155.6%
*-commutative55.6%
Simplified55.6%
if 1.12e-219 < t < 4.8e58Initial program 97.9%
Taylor expanded in z around 0 42.9%
if 4.8e58 < t Initial program 86.7%
associate-/r*98.0%
div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in t around inf 86.6%
associate-/r*85.8%
Simplified85.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
Final simplification57.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.8e-124) (not (<= t 2.5e-220))) (/ x (* (- y z) t)) (/ (- x) (* y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.8e-124) || !(t <= 2.5e-220)) {
tmp = x / ((y - z) * t);
} else {
tmp = -x / (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 <= (-3.8d-124)) .or. (.not. (t <= 2.5d-220))) then
tmp = x / ((y - z) * t)
else
tmp = -x / (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.8e-124) || !(t <= 2.5e-220)) {
tmp = x / ((y - z) * t);
} else {
tmp = -x / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.8e-124) or not (t <= 2.5e-220): tmp = x / ((y - z) * t) else: tmp = -x / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.8e-124) || !(t <= 2.5e-220)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(-x) / Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.8e-124) || ~((t <= 2.5e-220))) tmp = x / ((y - z) * t); else tmp = -x / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.8e-124], N[Not[LessEqual[t, 2.5e-220]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-124} \lor \neg \left(t \leq 2.5 \cdot 10^{-220}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\end{array}
\end{array}
if t < -3.80000000000000012e-124 or 2.5000000000000001e-220 < t Initial program 94.0%
Taylor expanded in t around inf 74.2%
if -3.80000000000000012e-124 < t < 2.5000000000000001e-220Initial program 83.7%
Taylor expanded in y around inf 59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in t around 0 55.6%
associate-*r/55.6%
neg-mul-155.6%
*-commutative55.6%
Simplified55.6%
Final simplification69.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.5e+86) (not (<= z 1.7e+80))) (/ x (* z (- y z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+86) || !(z <= 1.7e+80)) {
tmp = x / (z * (y - z));
} else {
tmp = x / ((y - z) * 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 <= (-8.5d+86)) .or. (.not. (z <= 1.7d+80))) then
tmp = x / (z * (y - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+86) || !(z <= 1.7e+80)) {
tmp = x / (z * (y - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.5e+86) or not (z <= 1.7e+80): tmp = x / (z * (y - z)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.5e+86) || !(z <= 1.7e+80)) tmp = Float64(x / Float64(z * Float64(y - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.5e+86) || ~((z <= 1.7e+80))) tmp = x / (z * (y - z)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.5e+86], N[Not[LessEqual[z, 1.7e+80]], $MachinePrecision]], N[(x / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+86} \lor \neg \left(z \leq 1.7 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -8.5000000000000005e86 or 1.69999999999999996e80 < z Initial program 86.3%
Taylor expanded in t around 0 85.2%
associate-*r/85.2%
neg-mul-185.2%
Simplified85.2%
expm1-log1p-u83.1%
expm1-udef75.3%
add-sqr-sqrt36.2%
sqrt-unprod69.8%
sqr-neg69.8%
sqrt-unprod39.2%
add-sqr-sqrt75.4%
Applied egg-rr75.4%
expm1-def75.3%
expm1-log1p75.3%
Simplified75.3%
if -8.5000000000000005e86 < z < 1.69999999999999996e80Initial program 94.6%
Taylor expanded in t around inf 68.4%
Final simplification71.0%
(FPCore (x y z t) :precision binary64 (if (<= t 2.8e-39) (/ x (* y (- t z))) (if (<= t 1.8e+219) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.8e-39) {
tmp = x / (y * (t - z));
} else if (t <= 1.8e+219) {
tmp = x / ((y - z) * t);
} 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 <= 2.8d-39) then
tmp = x / (y * (t - z))
else if (t <= 1.8d+219) then
tmp = x / ((y - z) * t)
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 <= 2.8e-39) {
tmp = x / (y * (t - z));
} else if (t <= 1.8e+219) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2.8e-39: tmp = x / (y * (t - z)) elif t <= 1.8e+219: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2.8e-39) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 1.8e+219) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2.8e-39) tmp = x / (y * (t - z)); elseif (t <= 1.8e+219) tmp = x / ((y - z) * t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.8e-39], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+219], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.8 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+219}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.8000000000000001e-39Initial program 92.3%
Taylor expanded in y around inf 66.9%
*-commutative66.9%
Simplified66.9%
if 2.8000000000000001e-39 < t < 1.80000000000000003e219Initial program 94.6%
Taylor expanded in t around inf 84.3%
if 1.80000000000000003e219 < t Initial program 74.1%
associate-/r*94.3%
div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.1%
associate-/r*92.1%
Simplified92.1%
Final simplification72.4%
(FPCore (x y z t) :precision binary64 (if (<= t 4.4e-80) (/ (/ x y) (- t z)) (if (<= t 5.2e+219) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.4e-80) {
tmp = (x / y) / (t - z);
} else if (t <= 5.2e+219) {
tmp = x / ((y - z) * t);
} 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 <= 4.4d-80) then
tmp = (x / y) / (t - z)
else if (t <= 5.2d+219) then
tmp = x / ((y - z) * t)
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 <= 4.4e-80) {
tmp = (x / y) / (t - z);
} else if (t <= 5.2e+219) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 4.4e-80: tmp = (x / y) / (t - z) elif t <= 5.2e+219: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 4.4e-80) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 5.2e+219) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 4.4e-80) tmp = (x / y) / (t - z); elseif (t <= 5.2e+219) tmp = x / ((y - z) * t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 4.4e-80], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+219], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.4 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+219}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 4.4000000000000002e-80Initial program 92.4%
associate-/r*97.5%
div-inv97.5%
Applied egg-rr97.5%
un-div-inv97.5%
Applied egg-rr97.5%
Taylor expanded in y around inf 67.3%
associate-/r*68.3%
Simplified68.3%
if 4.4000000000000002e-80 < t < 5.1999999999999999e219Initial program 93.9%
Taylor expanded in t around inf 80.6%
if 5.1999999999999999e219 < t Initial program 74.1%
associate-/r*94.3%
div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.1%
associate-/r*92.1%
Simplified92.1%
Final simplification73.0%
(FPCore (x y z t) :precision binary64 (if (<= t 3e-78) (/ (/ x (- t z)) y) (if (<= t 6.4e+221) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3e-78) {
tmp = (x / (t - z)) / y;
} else if (t <= 6.4e+221) {
tmp = x / ((y - z) * t);
} 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 <= 3d-78) then
tmp = (x / (t - z)) / y
else if (t <= 6.4d+221) then
tmp = x / ((y - z) * t)
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 <= 3e-78) {
tmp = (x / (t - z)) / y;
} else if (t <= 6.4e+221) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 3e-78: tmp = (x / (t - z)) / y elif t <= 6.4e+221: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 3e-78) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 6.4e+221) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 3e-78) tmp = (x / (t - z)) / y; elseif (t <= 6.4e+221) tmp = x / ((y - z) * t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 3e-78], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 6.4e+221], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{+221}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.99999999999999988e-78Initial program 92.5%
Taylor expanded in y around inf 67.0%
*-commutative67.0%
associate-/r*73.5%
Simplified73.5%
if 2.99999999999999988e-78 < t < 6.4e221Initial program 93.8%
Taylor expanded in t around inf 81.7%
if 6.4e221 < t Initial program 74.1%
associate-/r*94.3%
div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.1%
associate-/r*92.1%
Simplified92.1%
Final simplification76.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.55e-69) (not (<= z 10500000000000.0))) (- (/ x (* z t))) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.55e-69) || !(z <= 10500000000000.0)) {
tmp = -(x / (z * t));
} else {
tmp = (x / t) / y;
}
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.55d-69)) .or. (.not. (z <= 10500000000000.0d0))) then
tmp = -(x / (z * t))
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.55e-69) || !(z <= 10500000000000.0)) {
tmp = -(x / (z * t));
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.55e-69) or not (z <= 10500000000000.0): tmp = -(x / (z * t)) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.55e-69) || !(z <= 10500000000000.0)) tmp = Float64(-Float64(x / Float64(z * t))); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.55e-69) || ~((z <= 10500000000000.0))) tmp = -(x / (z * t)); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.55e-69], N[Not[LessEqual[z, 10500000000000.0]], $MachinePrecision]], (-N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.55 \cdot 10^{-69} \lor \neg \left(z \leq 10500000000000\right):\\
\;\;\;\;-\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.5499999999999999e-69 or 1.05e13 < z Initial program 89.7%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 44.5%
associate-/r*44.2%
Simplified44.2%
Taylor expanded in y around 0 41.6%
associate-*r/41.6%
neg-mul-141.6%
Simplified41.6%
if -3.5499999999999999e-69 < z < 1.05e13Initial program 94.0%
associate-/r*94.8%
div-inv94.7%
Applied egg-rr94.7%
clear-num93.1%
frac-times93.2%
metadata-eval93.2%
Applied egg-rr93.2%
Taylor expanded in z around 0 69.1%
associate-/r*69.5%
Simplified69.5%
Final simplification53.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.55e+59) (not (<= z 1.65e+48))) (/ x (* z t)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55e+59) || !(z <= 1.65e+48)) {
tmp = x / (z * t);
} else {
tmp = x / (y * 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 <= (-1.55d+59)) .or. (.not. (z <= 1.65d+48))) then
tmp = x / (z * t)
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55e+59) || !(z <= 1.65e+48)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.55e+59) or not (z <= 1.65e+48): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.55e+59) || !(z <= 1.65e+48)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.55e+59) || ~((z <= 1.65e+48))) tmp = x / (z * t); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.55e+59], N[Not[LessEqual[z, 1.65e+48]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+59} \lor \neg \left(z \leq 1.65 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.55000000000000007e59 or 1.65000000000000011e48 < z Initial program 87.9%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 43.4%
associate-/r*42.6%
Simplified42.6%
Taylor expanded in y around 0 40.8%
associate-*r/40.8%
neg-mul-140.8%
Simplified40.8%
expm1-log1p-u40.3%
expm1-udef60.2%
add-sqr-sqrt28.7%
sqrt-unprod57.6%
sqr-neg57.6%
sqrt-unprod31.7%
add-sqr-sqrt60.4%
*-commutative60.4%
Applied egg-rr60.4%
expm1-def38.0%
expm1-log1p38.2%
Simplified38.2%
if -1.55000000000000007e59 < z < 1.65000000000000011e48Initial program 94.5%
Taylor expanded in z around 0 59.2%
Final simplification49.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.15e+82) (not (<= z 9e+51))) (/ x (* z t)) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.15e+82) || !(z <= 9e+51)) {
tmp = x / (z * t);
} else {
tmp = (x / t) / y;
}
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.15d+82)) .or. (.not. (z <= 9d+51))) then
tmp = x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.15e+82) || !(z <= 9e+51)) {
tmp = x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.15e+82) or not (z <= 9e+51): tmp = x / (z * t) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.15e+82) || !(z <= 9e+51)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.15e+82) || ~((z <= 9e+51))) tmp = x / (z * t); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.15e+82], N[Not[LessEqual[z, 9e+51]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+82} \lor \neg \left(z \leq 9 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.15000000000000007e82 or 8.9999999999999999e51 < z Initial program 88.1%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 45.2%
associate-/r*43.5%
Simplified43.5%
Taylor expanded in y around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
expm1-log1p-u42.0%
expm1-udef62.8%
add-sqr-sqrt29.9%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod33.2%
add-sqr-sqrt63.0%
*-commutative63.0%
Applied egg-rr63.0%
expm1-def39.6%
expm1-log1p39.7%
Simplified39.7%
if -2.15000000000000007e82 < z < 8.9999999999999999e51Initial program 94.1%
associate-/r*95.9%
div-inv95.9%
Applied egg-rr95.9%
clear-num94.6%
frac-times94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Taylor expanded in z around 0 57.2%
associate-/r*59.4%
Simplified59.4%
Final simplification50.9%
(FPCore (x y z t) :precision binary64 (if (<= t 2.65e-37) (/ x (* y (- t z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.65e-37) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * 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 (t <= 2.65d-37) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.65e-37) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2.65e-37: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2.65e-37) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2.65e-37) tmp = x / (y * (t - z)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.65e-37], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.65 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 2.64999999999999998e-37Initial program 92.3%
Taylor expanded in y around inf 66.9%
*-commutative66.9%
Simplified66.9%
if 2.64999999999999998e-37 < t Initial program 89.6%
Taylor expanded in t around inf 81.8%
Final simplification71.1%
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
double code(double x, double y, double z, double t) {
return x / (y * t);
}
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)
end function
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
def code(x, y, z, t): return x / (y * t)
function code(x, y, z, t) return Float64(x / Float64(y * t)) end
function tmp = code(x, y, z, t) tmp = x / (y * t); end
code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 91.5%
Taylor expanded in z around 0 40.7%
Final simplification40.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023318
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))