
(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 21 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 89.3%
Taylor expanded in x around 0 89.3%
associate-/l/98.5%
Simplified98.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) t))) (t_2 (/ x (* z (- t z)))))
(if (<= z -2.25e+128)
t_2
(if (<= z 2.8e-75)
t_1
(if (<= z 2.2e+15)
(/ (/ x y) (- z))
(if (<= z 5.2e+104)
t_1
(if (<= z 1.6e+130) (* (/ -1.0 y) (/ x z)) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double t_2 = x / (z * (t - z));
double tmp;
if (z <= -2.25e+128) {
tmp = t_2;
} else if (z <= 2.8e-75) {
tmp = t_1;
} else if (z <= 2.2e+15) {
tmp = (x / y) / -z;
} else if (z <= 5.2e+104) {
tmp = t_1;
} else if (z <= 1.6e+130) {
tmp = (-1.0 / y) * (x / z);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / ((y - z) * t)
t_2 = x / (z * (t - z))
if (z <= (-2.25d+128)) then
tmp = t_2
else if (z <= 2.8d-75) then
tmp = t_1
else if (z <= 2.2d+15) then
tmp = (x / y) / -z
else if (z <= 5.2d+104) then
tmp = t_1
else if (z <= 1.6d+130) then
tmp = ((-1.0d0) / y) * (x / z)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double t_2 = x / (z * (t - z));
double tmp;
if (z <= -2.25e+128) {
tmp = t_2;
} else if (z <= 2.8e-75) {
tmp = t_1;
} else if (z <= 2.2e+15) {
tmp = (x / y) / -z;
} else if (z <= 5.2e+104) {
tmp = t_1;
} else if (z <= 1.6e+130) {
tmp = (-1.0 / y) * (x / z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * t) t_2 = x / (z * (t - z)) tmp = 0 if z <= -2.25e+128: tmp = t_2 elif z <= 2.8e-75: tmp = t_1 elif z <= 2.2e+15: tmp = (x / y) / -z elif z <= 5.2e+104: tmp = t_1 elif z <= 1.6e+130: tmp = (-1.0 / y) * (x / z) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) t_2 = Float64(x / Float64(z * Float64(t - z))) tmp = 0.0 if (z <= -2.25e+128) tmp = t_2; elseif (z <= 2.8e-75) tmp = t_1; elseif (z <= 2.2e+15) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (z <= 5.2e+104) tmp = t_1; elseif (z <= 1.6e+130) tmp = Float64(Float64(-1.0 / y) * Float64(x / z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * t); t_2 = x / (z * (t - z)); tmp = 0.0; if (z <= -2.25e+128) tmp = t_2; elseif (z <= 2.8e-75) tmp = t_1; elseif (z <= 2.2e+15) tmp = (x / y) / -z; elseif (z <= 5.2e+104) tmp = t_1; elseif (z <= 1.6e+130) tmp = (-1.0 / y) * (x / z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e+128], t$95$2, If[LessEqual[z, 2.8e-75], t$95$1, If[LessEqual[z, 2.2e+15], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 5.2e+104], t$95$1, If[LessEqual[z, 1.6e+130], N[(N[(-1.0 / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
t_2 := \frac{x}{z \cdot \left(t - z\right)}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+128}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+130}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.2500000000000001e128 or 1.6e130 < z Initial program 84.8%
Taylor expanded in y around 0 83.6%
associate-*r/83.6%
neg-mul-183.6%
Simplified83.6%
div-inv83.6%
add-sqr-sqrt52.0%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod30.3%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
associate-*r/82.3%
*-rgt-identity82.3%
Simplified82.3%
if -2.2500000000000001e128 < z < 2.79999999999999998e-75 or 2.2e15 < z < 5.20000000000000001e104Initial program 91.2%
Taylor expanded in t around inf 70.8%
if 2.79999999999999998e-75 < z < 2.2e15Initial program 96.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 38.4%
mul-1-neg38.4%
associate-/r*38.5%
distribute-neg-frac238.5%
Simplified38.5%
if 5.20000000000000001e104 < z < 1.6e130Initial program 68.4%
Taylor expanded in y around inf 19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in t around 0 19.4%
associate-*r/19.4%
mul-1-neg19.4%
*-commutative19.4%
Simplified19.4%
neg-mul-119.4%
*-commutative19.4%
times-frac34.7%
Applied egg-rr34.7%
Final simplification69.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.3e+106)
(* (/ -1.0 y) (/ x z))
(if (<= z 4.5e-75)
(/ (/ x y) t)
(if (<= z 6.2e+19)
(/ (/ x y) (- z))
(if (<= z 1.05e+105) (/ (- x) (* z t)) (/ (/ (- x) z) y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.3e+106) {
tmp = (-1.0 / y) * (x / z);
} else if (z <= 4.5e-75) {
tmp = (x / y) / t;
} else if (z <= 6.2e+19) {
tmp = (x / y) / -z;
} else if (z <= 1.05e+105) {
tmp = -x / (z * t);
} else {
tmp = (-x / z) / 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.3d+106)) then
tmp = ((-1.0d0) / y) * (x / z)
else if (z <= 4.5d-75) then
tmp = (x / y) / t
else if (z <= 6.2d+19) then
tmp = (x / y) / -z
else if (z <= 1.05d+105) then
tmp = -x / (z * t)
else
tmp = (-x / z) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.3e+106) {
tmp = (-1.0 / y) * (x / z);
} else if (z <= 4.5e-75) {
tmp = (x / y) / t;
} else if (z <= 6.2e+19) {
tmp = (x / y) / -z;
} else if (z <= 1.05e+105) {
tmp = -x / (z * t);
} else {
tmp = (-x / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.3e+106: tmp = (-1.0 / y) * (x / z) elif z <= 4.5e-75: tmp = (x / y) / t elif z <= 6.2e+19: tmp = (x / y) / -z elif z <= 1.05e+105: tmp = -x / (z * t) else: tmp = (-x / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.3e+106) tmp = Float64(Float64(-1.0 / y) * Float64(x / z)); elseif (z <= 4.5e-75) tmp = Float64(Float64(x / y) / t); elseif (z <= 6.2e+19) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (z <= 1.05e+105) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(Float64(-x) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.3e+106) tmp = (-1.0 / y) * (x / z); elseif (z <= 4.5e-75) tmp = (x / y) / t; elseif (z <= 6.2e+19) tmp = (x / y) / -z; elseif (z <= 1.05e+105) tmp = -x / (z * t); else tmp = (-x / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.3e+106], N[(N[(-1.0 / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-75], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.2e+19], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 1.05e+105], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+105}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\end{array}
\end{array}
if z < -3.30000000000000008e106Initial program 85.2%
Taylor expanded in y around inf 57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in t around 0 52.8%
associate-*r/52.8%
mul-1-neg52.8%
*-commutative52.8%
Simplified52.8%
neg-mul-152.8%
*-commutative52.8%
times-frac62.3%
Applied egg-rr62.3%
if -3.30000000000000008e106 < z < 4.5000000000000003e-75Initial program 90.9%
Taylor expanded in x around 0 90.9%
associate-/l/97.3%
Simplified97.3%
clear-num96.8%
associate-/r/97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 67.6%
associate-/l/72.2%
Simplified72.2%
if 4.5000000000000003e-75 < z < 6.2e19Initial program 96.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 38.4%
mul-1-neg38.4%
associate-/r*38.5%
distribute-neg-frac238.5%
Simplified38.5%
if 6.2e19 < z < 1.05000000000000005e105Initial program 100.0%
Taylor expanded in y around 0 71.7%
associate-*r/71.7%
neg-mul-171.7%
Simplified71.7%
Taylor expanded in z around 0 26.6%
associate-*r/26.6%
mul-1-neg26.6%
Simplified26.6%
if 1.05000000000000005e105 < z Initial program 81.2%
Taylor expanded in y around inf 52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in t around 0 49.1%
associate-*r/49.1%
mul-1-neg49.1%
*-commutative49.1%
Simplified49.1%
Taylor expanded in x around 0 49.1%
associate-*r/49.1%
times-frac60.2%
associate-*l/60.2%
mul-1-neg60.2%
distribute-neg-frac260.2%
Simplified60.2%
Final simplification62.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ (- x) z) y)))
(if (<= z -3.3e+106)
t_1
(if (<= z 4.1e-75)
(/ (/ x y) t)
(if (<= z 2.1e+18)
(/ (/ x y) (- z))
(if (<= z 5.2e+104) (/ (- x) (* z t)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / y;
double tmp;
if (z <= -3.3e+106) {
tmp = t_1;
} else if (z <= 4.1e-75) {
tmp = (x / y) / t;
} else if (z <= 2.1e+18) {
tmp = (x / y) / -z;
} else if (z <= 5.2e+104) {
tmp = -x / (z * t);
} else {
tmp = 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 = (-x / z) / y
if (z <= (-3.3d+106)) then
tmp = t_1
else if (z <= 4.1d-75) then
tmp = (x / y) / t
else if (z <= 2.1d+18) then
tmp = (x / y) / -z
else if (z <= 5.2d+104) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / y;
double tmp;
if (z <= -3.3e+106) {
tmp = t_1;
} else if (z <= 4.1e-75) {
tmp = (x / y) / t;
} else if (z <= 2.1e+18) {
tmp = (x / y) / -z;
} else if (z <= 5.2e+104) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (-x / z) / y tmp = 0 if z <= -3.3e+106: tmp = t_1 elif z <= 4.1e-75: tmp = (x / y) / t elif z <= 2.1e+18: tmp = (x / y) / -z elif z <= 5.2e+104: tmp = -x / (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / z) / y) tmp = 0.0 if (z <= -3.3e+106) tmp = t_1; elseif (z <= 4.1e-75) tmp = Float64(Float64(x / y) / t); elseif (z <= 2.1e+18) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (z <= 5.2e+104) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (-x / z) / y; tmp = 0.0; if (z <= -3.3e+106) tmp = t_1; elseif (z <= 4.1e-75) tmp = (x / y) / t; elseif (z <= 2.1e+18) tmp = (x / y) / -z; elseif (z <= 5.2e+104) tmp = -x / (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -3.3e+106], t$95$1, If[LessEqual[z, 4.1e-75], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.1e+18], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 5.2e+104], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{y}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.30000000000000008e106 or 5.20000000000000001e104 < z Initial program 83.0%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in t around 0 50.8%
associate-*r/50.8%
mul-1-neg50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x around 0 50.8%
associate-*r/50.8%
times-frac61.1%
associate-*l/61.1%
mul-1-neg61.1%
distribute-neg-frac261.1%
Simplified61.1%
if -3.30000000000000008e106 < z < 4.10000000000000002e-75Initial program 90.9%
Taylor expanded in x around 0 90.9%
associate-/l/97.3%
Simplified97.3%
clear-num96.8%
associate-/r/97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 67.6%
associate-/l/72.2%
Simplified72.2%
if 4.10000000000000002e-75 < z < 2.1e18Initial program 96.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 38.4%
mul-1-neg38.4%
associate-/r*38.5%
distribute-neg-frac238.5%
Simplified38.5%
if 2.1e18 < z < 5.20000000000000001e104Initial program 100.0%
Taylor expanded in y around 0 71.7%
associate-*r/71.7%
neg-mul-171.7%
Simplified71.7%
Taylor expanded in z around 0 26.6%
associate-*r/26.6%
mul-1-neg26.6%
Simplified26.6%
Final simplification62.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (- z t))))
(if (<= z -5.6e-65)
t_1
(if (<= z 8.5e-142)
(/ (/ x (- y z)) t)
(if (<= z 31000000000000.0) (/ (/ x y) (- t z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -5.6e-65) {
tmp = t_1;
} else if (z <= 8.5e-142) {
tmp = (x / (y - z)) / t;
} else if (z <= 31000000000000.0) {
tmp = (x / y) / (t - z);
} else {
tmp = 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 = (x / z) / (z - t)
if (z <= (-5.6d-65)) then
tmp = t_1
else if (z <= 8.5d-142) then
tmp = (x / (y - z)) / t
else if (z <= 31000000000000.0d0) then
tmp = (x / y) / (t - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -5.6e-65) {
tmp = t_1;
} else if (z <= 8.5e-142) {
tmp = (x / (y - z)) / t;
} else if (z <= 31000000000000.0) {
tmp = (x / y) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) / (z - t) tmp = 0 if z <= -5.6e-65: tmp = t_1 elif z <= 8.5e-142: tmp = (x / (y - z)) / t elif z <= 31000000000000.0: tmp = (x / y) / (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (z <= -5.6e-65) tmp = t_1; elseif (z <= 8.5e-142) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (z <= 31000000000000.0) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) / (z - t); tmp = 0.0; if (z <= -5.6e-65) tmp = t_1; elseif (z <= 8.5e-142) tmp = (x / (y - z)) / t; elseif (z <= 31000000000000.0) tmp = (x / y) / (t - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e-65], t$95$1, If[LessEqual[z, 8.5e-142], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 31000000000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-142}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;z \leq 31000000000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.6000000000000001e-65 or 3.1e13 < z Initial program 86.0%
Taylor expanded in x around 0 86.0%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
if -5.6000000000000001e-65 < z < 8.4999999999999996e-142Initial program 91.9%
Taylor expanded in x around 0 91.9%
associate-/l/96.4%
Simplified96.4%
clear-num95.8%
associate-/r/96.3%
Applied egg-rr96.3%
Taylor expanded in t around inf 84.2%
*-commutative84.2%
associate-/r*86.3%
Simplified86.3%
if 8.4999999999999996e-142 < z < 3.1e13Initial program 93.5%
Taylor expanded in x around 0 93.5%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in y around inf 62.7%
Final simplification82.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.25e+128)
(/ x (* z (- t z)))
(if (<= z 1.1e-71)
(/ x (* (- y z) t))
(if (<= z 7e+38) (/ (/ x y) (- z)) (/ x (* z (- y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+128) {
tmp = x / (z * (t - z));
} else if (z <= 1.1e-71) {
tmp = x / ((y - z) * t);
} else if (z <= 7e+38) {
tmp = (x / y) / -z;
} else {
tmp = x / (z * (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 (z <= (-2.25d+128)) then
tmp = x / (z * (t - z))
else if (z <= 1.1d-71) then
tmp = x / ((y - z) * t)
else if (z <= 7d+38) then
tmp = (x / y) / -z
else
tmp = x / (z * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+128) {
tmp = x / (z * (t - z));
} else if (z <= 1.1e-71) {
tmp = x / ((y - z) * t);
} else if (z <= 7e+38) {
tmp = (x / y) / -z;
} else {
tmp = x / (z * (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.25e+128: tmp = x / (z * (t - z)) elif z <= 1.1e-71: tmp = x / ((y - z) * t) elif z <= 7e+38: tmp = (x / y) / -z else: tmp = x / (z * (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.25e+128) tmp = Float64(x / Float64(z * Float64(t - z))); elseif (z <= 1.1e-71) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (z <= 7e+38) tmp = Float64(Float64(x / y) / Float64(-z)); else tmp = Float64(x / Float64(z * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.25e+128) tmp = x / (z * (t - z)); elseif (z <= 1.1e-71) tmp = x / ((y - z) * t); elseif (z <= 7e+38) tmp = (x / y) / -z; else tmp = x / (z * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.25e+128], N[(x / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-71], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+38], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], N[(x / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+128}:\\
\;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-71}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+38}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -2.2500000000000001e128Initial program 86.7%
Taylor expanded in y around 0 86.7%
associate-*r/86.7%
neg-mul-186.7%
Simplified86.7%
div-inv86.7%
add-sqr-sqrt48.9%
sqrt-unprod77.3%
sqr-neg77.3%
sqrt-unprod37.8%
add-sqr-sqrt86.7%
Applied egg-rr86.7%
associate-*r/86.7%
*-rgt-identity86.7%
Simplified86.7%
if -2.2500000000000001e128 < z < 1.09999999999999999e-71Initial program 90.4%
Taylor expanded in t around inf 74.3%
if 1.09999999999999999e-71 < z < 7.00000000000000003e38Initial program 96.4%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.0%
associate-*r/64.0%
neg-mul-164.0%
Simplified64.0%
Taylor expanded in z around 0 38.2%
mul-1-neg38.2%
associate-/r*38.4%
distribute-neg-frac238.4%
Simplified38.4%
if 7.00000000000000003e38 < z Initial program 84.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 91.4%
associate-*r/91.4%
neg-mul-191.4%
Simplified91.4%
*-un-lft-identity91.4%
add-sqr-sqrt57.9%
sqrt-unprod67.5%
sqr-neg67.5%
sqrt-unprod22.0%
add-sqr-sqrt67.9%
Applied egg-rr67.9%
*-lft-identity67.9%
Simplified67.9%
Taylor expanded in x around 0 68.1%
Final simplification70.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* t (- z)))))
(if (<= z -1.5e-77)
t_1
(if (<= z 1.1e-71)
(/ (/ x y) t)
(if (<= z 4.4e+19) (/ (/ x y) (- z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if (z <= -1.5e-77) {
tmp = t_1;
} else if (z <= 1.1e-71) {
tmp = (x / y) / t;
} else if (z <= 4.4e+19) {
tmp = (x / y) / -z;
} else {
tmp = 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 = x / (t * -z)
if (z <= (-1.5d-77)) then
tmp = t_1
else if (z <= 1.1d-71) then
tmp = (x / y) / t
else if (z <= 4.4d+19) then
tmp = (x / y) / -z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if (z <= -1.5e-77) {
tmp = t_1;
} else if (z <= 1.1e-71) {
tmp = (x / y) / t;
} else if (z <= 4.4e+19) {
tmp = (x / y) / -z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t * -z) tmp = 0 if z <= -1.5e-77: tmp = t_1 elif z <= 1.1e-71: tmp = (x / y) / t elif z <= 4.4e+19: tmp = (x / y) / -z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t * Float64(-z))) tmp = 0.0 if (z <= -1.5e-77) tmp = t_1; elseif (z <= 1.1e-71) tmp = Float64(Float64(x / y) / t); elseif (z <= 4.4e+19) tmp = Float64(Float64(x / y) / Float64(-z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t * -z); tmp = 0.0; if (z <= -1.5e-77) tmp = t_1; elseif (z <= 1.1e-71) tmp = (x / y) / t; elseif (z <= 4.4e+19) tmp = (x / y) / -z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-77], t$95$1, If[LessEqual[z, 1.1e-71], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.4e+19], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t \cdot \left(-z\right)}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.50000000000000008e-77 or 4.4e19 < z Initial program 86.6%
Taylor expanded in y around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
Simplified75.5%
Taylor expanded in z around 0 37.3%
associate-*r/37.3%
mul-1-neg37.3%
Simplified37.3%
if -1.50000000000000008e-77 < z < 1.09999999999999999e-71Initial program 91.0%
Taylor expanded in x around 0 91.0%
associate-/l/96.5%
Simplified96.5%
clear-num95.9%
associate-/r/96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 76.7%
associate-/l/80.9%
Simplified80.9%
if 1.09999999999999999e-71 < z < 4.4e19Initial program 96.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 38.4%
mul-1-neg38.4%
associate-/r*38.5%
distribute-neg-frac238.5%
Simplified38.5%
Final simplification54.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- x) (* z t))))
(if (<= z -3.8e-77)
t_1
(if (<= z 1.75e-75)
(/ (/ x y) t)
(if (<= z 5e+19) (/ x (* z (- y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -x / (z * t);
double tmp;
if (z <= -3.8e-77) {
tmp = t_1;
} else if (z <= 1.75e-75) {
tmp = (x / y) / t;
} else if (z <= 5e+19) {
tmp = x / (z * -y);
} else {
tmp = 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 = -x / (z * t)
if (z <= (-3.8d-77)) then
tmp = t_1
else if (z <= 1.75d-75) then
tmp = (x / y) / t
else if (z <= 5d+19) then
tmp = x / (z * -y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -x / (z * t);
double tmp;
if (z <= -3.8e-77) {
tmp = t_1;
} else if (z <= 1.75e-75) {
tmp = (x / y) / t;
} else if (z <= 5e+19) {
tmp = x / (z * -y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -x / (z * t) tmp = 0 if z <= -3.8e-77: tmp = t_1 elif z <= 1.75e-75: tmp = (x / y) / t elif z <= 5e+19: tmp = x / (z * -y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (z <= -3.8e-77) tmp = t_1; elseif (z <= 1.75e-75) tmp = Float64(Float64(x / y) / t); elseif (z <= 5e+19) tmp = Float64(x / Float64(z * Float64(-y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -x / (z * t); tmp = 0.0; if (z <= -3.8e-77) tmp = t_1; elseif (z <= 1.75e-75) tmp = (x / y) / t; elseif (z <= 5e+19) tmp = x / (z * -y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-77], t$95$1, If[LessEqual[z, 1.75e-75], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 5e+19], N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.7999999999999999e-77 or 5e19 < z Initial program 86.6%
Taylor expanded in y around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
Simplified75.5%
Taylor expanded in z around 0 37.3%
associate-*r/37.3%
mul-1-neg37.3%
Simplified37.3%
if -3.7999999999999999e-77 < z < 1.74999999999999993e-75Initial program 91.0%
Taylor expanded in x around 0 91.0%
associate-/l/96.5%
Simplified96.5%
clear-num95.9%
associate-/r/96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 76.7%
associate-/l/80.9%
Simplified80.9%
if 1.74999999999999993e-75 < z < 5e19Initial program 96.2%
Taylor expanded in y around inf 45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in t around 0 38.4%
associate-*r/38.4%
mul-1-neg38.4%
*-commutative38.4%
Simplified38.4%
Final simplification54.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.15e-139) (not (<= t 7.8e-88))) (/ x (* (- y z) t)) (/ (/ (- x) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e-139) || !(t <= 7.8e-88)) {
tmp = x / ((y - z) * t);
} else {
tmp = (-x / z) / 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 ((t <= (-1.15d-139)) .or. (.not. (t <= 7.8d-88))) then
tmp = x / ((y - z) * t)
else
tmp = (-x / z) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e-139) || !(t <= 7.8e-88)) {
tmp = x / ((y - z) * t);
} else {
tmp = (-x / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.15e-139) or not (t <= 7.8e-88): tmp = x / ((y - z) * t) else: tmp = (-x / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.15e-139) || !(t <= 7.8e-88)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(Float64(-x) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.15e-139) || ~((t <= 7.8e-88))) tmp = x / ((y - z) * t); else tmp = (-x / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.15e-139], N[Not[LessEqual[t, 7.8e-88]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-139} \lor \neg \left(t \leq 7.8 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\end{array}
\end{array}
if t < -1.15000000000000006e-139 or 7.79999999999999985e-88 < t Initial program 86.4%
Taylor expanded in t around inf 75.5%
if -1.15000000000000006e-139 < t < 7.79999999999999985e-88Initial program 94.5%
Taylor expanded in y around inf 68.6%
*-commutative68.6%
Simplified68.6%
Taylor expanded in t around 0 58.0%
associate-*r/58.0%
mul-1-neg58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in x around 0 58.0%
associate-*r/58.0%
times-frac59.6%
associate-*l/59.6%
mul-1-neg59.6%
distribute-neg-frac259.6%
Simplified59.6%
Final simplification69.7%
(FPCore (x y z t) :precision binary64 (if (<= t -1.36e-139) (/ (/ x y) (- t z)) (if (<= t 1.2e-49) (/ (/ x z) (- z y)) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.36e-139) {
tmp = (x / y) / (t - z);
} else if (t <= 1.2e-49) {
tmp = (x / z) / (z - y);
} 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 <= (-1.36d-139)) then
tmp = (x / y) / (t - z)
else if (t <= 1.2d-49) then
tmp = (x / z) / (z - y)
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 <= -1.36e-139) {
tmp = (x / y) / (t - z);
} else if (t <= 1.2e-49) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.36e-139: tmp = (x / y) / (t - z) elif t <= 1.2e-49: tmp = (x / z) / (z - y) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.36e-139) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.2e-49) tmp = Float64(Float64(x / z) / Float64(z - y)); 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 <= -1.36e-139) tmp = (x / y) / (t - z); elseif (t <= 1.2e-49) tmp = (x / z) / (z - y); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.36e-139], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-49], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.36 \cdot 10^{-139}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if t < -1.36000000000000003e-139Initial program 87.9%
Taylor expanded in x around 0 87.9%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in y around inf 69.1%
if -1.36000000000000003e-139 < t < 1.19999999999999996e-49Initial program 94.8%
associate-/l/97.9%
Simplified97.9%
Taylor expanded in t around 0 84.7%
associate-*r/84.7%
neg-mul-184.7%
Simplified84.7%
if 1.19999999999999996e-49 < t Initial program 83.9%
Taylor expanded in x around 0 83.9%
associate-/l/98.7%
Simplified98.7%
clear-num98.6%
associate-/r/98.7%
Applied egg-rr98.7%
Taylor expanded in t around inf 75.5%
*-commutative75.5%
associate-/r*84.5%
Simplified84.5%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.35e-118) (/ (/ x y) (- t z)) (if (<= y 1.3e-161) (/ x (* z (- z t))) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e-118) {
tmp = (x / y) / (t - z);
} else if (y <= 1.3e-161) {
tmp = x / (z * (z - t));
} 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 <= (-1.35d-118)) then
tmp = (x / y) / (t - z)
else if (y <= 1.3d-161) then
tmp = x / (z * (z - t))
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 <= -1.35e-118) {
tmp = (x / y) / (t - z);
} else if (y <= 1.3e-161) {
tmp = x / (z * (z - t));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e-118: tmp = (x / y) / (t - z) elif y <= 1.3e-161: tmp = x / (z * (z - t)) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e-118) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 1.3e-161) tmp = Float64(x / Float64(z * Float64(z - t))); 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 <= -1.35e-118) tmp = (x / y) / (t - z); elseif (y <= 1.3e-161) tmp = x / (z * (z - t)); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e-118], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-161], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-118}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -1.34999999999999997e-118Initial program 87.5%
Taylor expanded in x around 0 87.5%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 87.1%
if -1.34999999999999997e-118 < y < 1.29999999999999998e-161Initial program 88.1%
Taylor expanded in y around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
if 1.29999999999999998e-161 < y Initial program 91.4%
Taylor expanded in x around 0 91.4%
associate-/l/98.6%
Simplified98.6%
clear-num98.1%
associate-/r/98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 59.0%
*-commutative59.0%
associate-/r*71.2%
Simplified71.2%
Final simplification76.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.4e-77) (not (<= z 1.08e-32))) (/ x (* t (- z))) (/ (/ x y) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.4e-77) || !(z <= 1.08e-32)) {
tmp = x / (t * -z);
} 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 <= (-3.4d-77)) .or. (.not. (z <= 1.08d-32))) then
tmp = x / (t * -z)
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 <= -3.4e-77) || !(z <= 1.08e-32)) {
tmp = x / (t * -z);
} else {
tmp = (x / y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.4e-77) or not (z <= 1.08e-32): tmp = x / (t * -z) else: tmp = (x / y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.4e-77) || !(z <= 1.08e-32)) tmp = Float64(x / Float64(t * Float64(-z))); else tmp = Float64(Float64(x / y) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.4e-77) || ~((z <= 1.08e-32))) tmp = x / (t * -z); else tmp = (x / y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.4e-77], N[Not[LessEqual[z, 1.08e-32]], $MachinePrecision]], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-77} \lor \neg \left(z \leq 1.08 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -3.39999999999999983e-77 or 1.08e-32 < z Initial program 87.6%
Taylor expanded in y around 0 75.4%
associate-*r/75.4%
neg-mul-175.4%
Simplified75.4%
Taylor expanded in z around 0 37.0%
associate-*r/37.0%
mul-1-neg37.0%
Simplified37.0%
if -3.39999999999999983e-77 < z < 1.08e-32Initial program 91.3%
Taylor expanded in x around 0 91.3%
associate-/l/97.0%
Simplified97.0%
clear-num96.5%
associate-/r/96.9%
Applied egg-rr96.9%
Taylor expanded in z around 0 68.3%
associate-/l/72.7%
Simplified72.7%
Final simplification53.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.6e+107) (not (<= z 3.35e+143))) (/ x (* y z)) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.6e+107) || !(z <= 3.35e+143)) {
tmp = x / (y * z);
} 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 <= (-5.6d+107)) .or. (.not. (z <= 3.35d+143))) then
tmp = x / (y * z)
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 <= -5.6e+107) || !(z <= 3.35e+143)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.6e+107) or not (z <= 3.35e+143): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.6e+107) || !(z <= 3.35e+143)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.6e+107) || ~((z <= 3.35e+143))) tmp = x / (y * z); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.6e+107], N[Not[LessEqual[z, 3.35e+143]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+107} \lor \neg \left(z \leq 3.35 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -5.59999999999999969e107 or 3.3500000000000001e143 < z Initial program 83.2%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 93.5%
associate-*r/93.5%
neg-mul-193.5%
Simplified93.5%
*-un-lft-identity93.5%
add-sqr-sqrt52.9%
sqrt-unprod67.1%
sqr-neg67.1%
sqrt-unprod30.5%
add-sqr-sqrt76.7%
Applied egg-rr76.7%
*-lft-identity76.7%
Simplified76.7%
Taylor expanded in z around 0 54.4%
*-commutative54.4%
Simplified54.4%
if -5.59999999999999969e107 < z < 3.3500000000000001e143Initial program 91.8%
Taylor expanded in z around 0 53.7%
clear-num54.3%
associate-/r/53.7%
*-commutative53.7%
associate-/r*53.7%
Applied egg-rr53.7%
*-commutative53.7%
associate-*r/59.5%
div-inv59.5%
add-sqr-sqrt30.3%
sqrt-unprod33.0%
sqr-neg33.0%
sqrt-unprod9.5%
add-sqr-sqrt22.8%
associate-/l/20.9%
associate-/r*23.1%
add-sqr-sqrt8.1%
sqrt-unprod33.7%
sqr-neg33.7%
sqrt-unprod30.7%
add-sqr-sqrt57.5%
Applied egg-rr57.5%
Final simplification56.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.7e+25) (not (<= z 4.7e+98))) (/ x (* y z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.7e+25) || !(z <= 4.7e+98)) {
tmp = x / (y * z);
} 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 <= (-5.7d+25)) .or. (.not. (z <= 4.7d+98))) then
tmp = x / (y * z)
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 <= -5.7e+25) || !(z <= 4.7e+98)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.7e+25) or not (z <= 4.7e+98): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.7e+25) || !(z <= 4.7e+98)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.7e+25) || ~((z <= 4.7e+98))) tmp = x / (y * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.7e+25], N[Not[LessEqual[z, 4.7e+98]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+25} \lor \neg \left(z \leq 4.7 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -5.6999999999999996e25 or 4.6999999999999997e98 < z Initial program 82.8%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 90.8%
associate-*r/90.8%
neg-mul-190.8%
Simplified90.8%
*-un-lft-identity90.8%
add-sqr-sqrt51.3%
sqrt-unprod65.9%
sqr-neg65.9%
sqrt-unprod28.4%
add-sqr-sqrt70.4%
Applied egg-rr70.4%
*-lft-identity70.4%
Simplified70.4%
Taylor expanded in z around 0 47.9%
*-commutative47.9%
Simplified47.9%
if -5.6999999999999996e25 < z < 4.6999999999999997e98Initial program 93.1%
Taylor expanded in z around 0 57.7%
Final simplification54.1%
(FPCore (x y z t) :precision binary64 (if (<= t 1.35e+151) (/ x (* (- y z) (- t z))) (/ (/ x (- y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.35e+151) {
tmp = x / ((y - 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 (t <= 1.35d+151) then
tmp = x / ((y - 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 (t <= 1.35e+151) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.35e+151: tmp = x / ((y - z) * (t - z)) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.35e+151) tmp = Float64(x / Float64(Float64(y - 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 (t <= 1.35e+151) tmp = x / ((y - z) * (t - z)); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.35e+151], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.35 \cdot 10^{+151}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if t < 1.3500000000000001e151Initial program 91.1%
if 1.3500000000000001e151 < t Initial program 78.9%
Taylor expanded in x around 0 78.9%
associate-/l/99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 78.9%
*-commutative78.9%
associate-/r*97.4%
Simplified97.4%
(FPCore (x y z t) :precision binary64 (if (<= y -5.8e-103) (/ (/ x y) (- t z)) (/ (/ x (- y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-103) {
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 (y <= (-5.8d-103)) 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 (y <= -5.8e-103) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e-103: tmp = (x / y) / (t - z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e-103) tmp = Float64(Float64(x / y) / 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 <= -5.8e-103) tmp = (x / y) / (t - z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e-103], N[(N[(x / y), $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 -5.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -5.7999999999999997e-103Initial program 87.2%
Taylor expanded in x around 0 87.2%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 87.9%
if -5.7999999999999997e-103 < y Initial program 90.3%
Taylor expanded in x around 0 90.3%
associate-/l/97.9%
Simplified97.9%
clear-num97.6%
associate-/r/97.9%
Applied egg-rr97.9%
Taylor expanded in t around inf 59.2%
*-commutative59.2%
associate-/r*67.5%
Simplified67.5%
(FPCore (x y z t) :precision binary64 (if (<= t 8.8e-88) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 8.8e-88) {
tmp = (x / y) / (t - z);
} 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 <= 8.8d-88) then
tmp = (x / y) / (t - z)
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 <= 8.8e-88) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 8.8e-88: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 8.8e-88) tmp = Float64(Float64(x / y) / Float64(t - z)); 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 <= 8.8e-88) tmp = (x / y) / (t - z); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 8.8e-88], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.8 \cdot 10^{-88}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 8.8000000000000002e-88Initial program 91.5%
Taylor expanded in x around 0 91.5%
associate-/l/98.4%
Simplified98.4%
Taylor expanded in y around inf 67.8%
if 8.8000000000000002e-88 < t Initial program 85.0%
associate-/l/96.0%
Simplified96.0%
Taylor expanded in t around inf 81.7%
(FPCore (x y z t) :precision binary64 (if (<= t 8.8e-88) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 8.8e-88) {
tmp = x / (y * (t - z));
} 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 <= 8.8d-88) then
tmp = x / (y * (t - z))
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 <= 8.8e-88) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 8.8e-88: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 8.8e-88) tmp = Float64(x / Float64(y * Float64(t - z))); 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 <= 8.8e-88) tmp = x / (y * (t - z)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 8.8e-88], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.8 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 8.8000000000000002e-88Initial program 91.5%
Taylor expanded in y around inf 66.7%
*-commutative66.7%
Simplified66.7%
if 8.8000000000000002e-88 < t Initial program 85.0%
associate-/l/96.0%
Simplified96.0%
Taylor expanded in t around inf 81.7%
Final simplification71.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e-109) (/ x (* y (- t z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e-109) {
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 (y <= (-1.8d-109)) 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 (y <= -1.8e-109) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e-109: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e-109) 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 (y <= -1.8e-109) tmp = x / (y * (t - z)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e-109], 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}\;y \leq -1.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -1.8e-109Initial program 87.3%
Taylor expanded in y around inf 80.1%
*-commutative80.1%
Simplified80.1%
if -1.8e-109 < y Initial program 90.3%
Taylor expanded in t around inf 59.5%
Final simplification66.1%
(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(Float64(x / 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[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 89.3%
associate-/l/96.7%
Simplified96.7%
(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 89.3%
Taylor expanded in z around 0 43.2%
Final simplification43.2%
(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 2024085
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(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))))