
(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 20 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 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 5e-289) (/ (/ x (- y z)) (- t z)) t_1)))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 5e-289) {
tmp = (x / (y - z)) / (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 / ((y - z) * (t - z))
if (t_1 <= 5d-289) then
tmp = (x / (y - z)) / (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 / ((y - z) * (t - z));
double tmp;
if (t_1 <= 5e-289) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= 5e-289: tmp = (x / (y - z)) / (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 5e-289) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (t - z)); tmp = 0.0; if (t_1 <= 5e-289) tmp = (x / (y - z)) / (t - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e-289], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-289}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 5.00000000000000029e-289Initial program 89.1%
associate-/r*97.8%
Simplified97.8%
if 5.00000000000000029e-289 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.8%
Final simplification98.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) (- t z))))
(if (<= z -1.5e+55)
(/ 1.0 (/ z (/ x z)))
(if (<= z 1e-305)
t_1
(if (<= z 5e-119)
(/ x (* (- y z) t))
(if (<= z 2.25e-5)
t_1
(if (<= z 140000000000.0)
(/ (/ x t) (- y z))
(* (/ x z) (/ 1.0 z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / (t - z);
double tmp;
if (z <= -1.5e+55) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 1e-305) {
tmp = t_1;
} else if (z <= 5e-119) {
tmp = x / ((y - z) * t);
} else if (z <= 2.25e-5) {
tmp = t_1;
} else if (z <= 140000000000.0) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) * (1.0 / 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 / y) / (t - z)
if (z <= (-1.5d+55)) then
tmp = 1.0d0 / (z / (x / z))
else if (z <= 1d-305) then
tmp = t_1
else if (z <= 5d-119) then
tmp = x / ((y - z) * t)
else if (z <= 2.25d-5) then
tmp = t_1
else if (z <= 140000000000.0d0) then
tmp = (x / t) / (y - z)
else
tmp = (x / z) * (1.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / (t - z);
double tmp;
if (z <= -1.5e+55) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 1e-305) {
tmp = t_1;
} else if (z <= 5e-119) {
tmp = x / ((y - z) * t);
} else if (z <= 2.25e-5) {
tmp = t_1;
} else if (z <= 140000000000.0) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) / (t - z) tmp = 0 if z <= -1.5e+55: tmp = 1.0 / (z / (x / z)) elif z <= 1e-305: tmp = t_1 elif z <= 5e-119: tmp = x / ((y - z) * t) elif z <= 2.25e-5: tmp = t_1 elif z <= 140000000000.0: tmp = (x / t) / (y - z) else: tmp = (x / z) * (1.0 / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) / Float64(t - z)) tmp = 0.0 if (z <= -1.5e+55) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (z <= 1e-305) tmp = t_1; elseif (z <= 5e-119) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (z <= 2.25e-5) tmp = t_1; elseif (z <= 140000000000.0) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) / (t - z); tmp = 0.0; if (z <= -1.5e+55) tmp = 1.0 / (z / (x / z)); elseif (z <= 1e-305) tmp = t_1; elseif (z <= 5e-119) tmp = x / ((y - z) * t); elseif (z <= 2.25e-5) tmp = t_1; elseif (z <= 140000000000.0) tmp = (x / t) / (y - z); else tmp = (x / z) * (1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+55], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-305], t$95$1, If[LessEqual[z, 5e-119], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-5], t$95$1, If[LessEqual[z, 140000000000.0], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t - z}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-119}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 140000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -1.50000000000000008e55Initial program 86.3%
Taylor expanded in z around inf 80.9%
unpow280.9%
Simplified80.9%
clear-num80.9%
inv-pow80.9%
associate-/l*82.9%
Applied egg-rr82.9%
unpow-182.9%
Simplified82.9%
if -1.50000000000000008e55 < z < 9.99999999999999996e-306 or 4.99999999999999993e-119 < z < 2.25000000000000014e-5Initial program 92.0%
*-un-lft-identity92.0%
times-frac94.2%
Applied egg-rr94.2%
*-commutative94.2%
clear-num93.9%
frac-times93.4%
metadata-eval93.4%
Applied egg-rr93.4%
Taylor expanded in y around inf 73.6%
associate-/r*77.2%
Simplified77.2%
if 9.99999999999999996e-306 < z < 4.99999999999999993e-119Initial program 99.8%
Taylor expanded in t around inf 86.6%
if 2.25000000000000014e-5 < z < 1.4e11Initial program 81.0%
Taylor expanded in t around inf 42.9%
associate-/r*61.6%
Simplified61.6%
if 1.4e11 < z Initial program 90.2%
Taylor expanded in z around inf 82.9%
unpow282.9%
Simplified82.9%
associate-/r*89.8%
div-inv89.8%
Applied egg-rr89.8%
Final simplification82.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)) (t_2 (* (/ x z) (/ 1.0 z))))
(if (<= z -7.2e+54)
t_2
(if (<= z 8.2e-110)
t_1
(if (<= z 4.5e-13) (/ (/ (- x) y) z) (if (<= z 30000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = (x / z) * (1.0 / z);
double tmp;
if (z <= -7.2e+54) {
tmp = t_2;
} else if (z <= 8.2e-110) {
tmp = t_1;
} else if (z <= 4.5e-13) {
tmp = (-x / y) / z;
} else if (z <= 30000000.0) {
tmp = t_1;
} 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 / t) / y
t_2 = (x / z) * (1.0d0 / z)
if (z <= (-7.2d+54)) then
tmp = t_2
else if (z <= 8.2d-110) then
tmp = t_1
else if (z <= 4.5d-13) then
tmp = (-x / y) / z
else if (z <= 30000000.0d0) then
tmp = t_1
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 / t) / y;
double t_2 = (x / z) * (1.0 / z);
double tmp;
if (z <= -7.2e+54) {
tmp = t_2;
} else if (z <= 8.2e-110) {
tmp = t_1;
} else if (z <= 4.5e-13) {
tmp = (-x / y) / z;
} else if (z <= 30000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / t) / y t_2 = (x / z) * (1.0 / z) tmp = 0 if z <= -7.2e+54: tmp = t_2 elif z <= 8.2e-110: tmp = t_1 elif z <= 4.5e-13: tmp = (-x / y) / z elif z <= 30000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(x / z) * Float64(1.0 / z)) tmp = 0.0 if (z <= -7.2e+54) tmp = t_2; elseif (z <= 8.2e-110) tmp = t_1; elseif (z <= 4.5e-13) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 30000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / t) / y; t_2 = (x / z) * (1.0 / z); tmp = 0.0; if (z <= -7.2e+54) tmp = t_2; elseif (z <= 8.2e-110) tmp = t_1; elseif (z <= 4.5e-13) tmp = (-x / y) / z; elseif (z <= 30000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+54], t$95$2, If[LessEqual[z, 8.2e-110], t$95$1, If[LessEqual[z, 4.5e-13], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 30000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 30000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -7.2000000000000003e54 or 3e7 < z Initial program 88.7%
Taylor expanded in z around inf 82.1%
unpow282.1%
Simplified82.1%
associate-/r*87.2%
div-inv87.2%
Applied egg-rr87.2%
if -7.2000000000000003e54 < z < 8.19999999999999965e-110 or 4.5e-13 < z < 3e7Initial program 93.2%
*-un-lft-identity93.2%
times-frac94.7%
Applied egg-rr94.7%
*-commutative94.7%
clear-num93.8%
frac-times93.7%
metadata-eval93.7%
Applied egg-rr93.7%
Taylor expanded in z around 0 63.4%
associate-/r*67.8%
Simplified67.8%
if 8.19999999999999965e-110 < z < 4.5e-13Initial program 99.7%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around 0 45.0%
associate-*r/45.0%
neg-mul-145.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in x around 0 45.0%
associate-/l/38.3%
associate-*r/38.3%
neg-mul-138.3%
distribute-neg-frac38.3%
Simplified38.3%
Taylor expanded in x around 0 45.0%
mul-1-neg45.0%
associate-/r*45.1%
distribute-neg-frac45.1%
Simplified45.1%
Final simplification75.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (/ 1.0 z))))
(if (<= z -1.65e+54)
t_1
(if (<= z 9.2e-110)
(/ 1.0 (/ t (/ x y)))
(if (<= z 3.8e-13)
(/ (/ (- x) y) z)
(if (<= z 11000000000.0) (/ (/ x t) y) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (1.0 / z);
double tmp;
if (z <= -1.65e+54) {
tmp = t_1;
} else if (z <= 9.2e-110) {
tmp = 1.0 / (t / (x / y));
} else if (z <= 3.8e-13) {
tmp = (-x / y) / z;
} else if (z <= 11000000000.0) {
tmp = (x / t) / 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) * (1.0d0 / z)
if (z <= (-1.65d+54)) then
tmp = t_1
else if (z <= 9.2d-110) then
tmp = 1.0d0 / (t / (x / y))
else if (z <= 3.8d-13) then
tmp = (-x / y) / z
else if (z <= 11000000000.0d0) then
tmp = (x / t) / 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) * (1.0 / z);
double tmp;
if (z <= -1.65e+54) {
tmp = t_1;
} else if (z <= 9.2e-110) {
tmp = 1.0 / (t / (x / y));
} else if (z <= 3.8e-13) {
tmp = (-x / y) / z;
} else if (z <= 11000000000.0) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) * (1.0 / z) tmp = 0 if z <= -1.65e+54: tmp = t_1 elif z <= 9.2e-110: tmp = 1.0 / (t / (x / y)) elif z <= 3.8e-13: tmp = (-x / y) / z elif z <= 11000000000.0: tmp = (x / t) / y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(1.0 / z)) tmp = 0.0 if (z <= -1.65e+54) tmp = t_1; elseif (z <= 9.2e-110) tmp = Float64(1.0 / Float64(t / Float64(x / y))); elseif (z <= 3.8e-13) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 11000000000.0) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) * (1.0 / z); tmp = 0.0; if (z <= -1.65e+54) tmp = t_1; elseif (z <= 9.2e-110) tmp = 1.0 / (t / (x / y)); elseif (z <= 3.8e-13) tmp = (-x / y) / z; elseif (z <= 11000000000.0) tmp = (x / t) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+54], t$95$1, If[LessEqual[z, 9.2e-110], N[(1.0 / N[(t / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-13], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 11000000000.0], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 11000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.65e54 or 1.1e10 < z Initial program 88.7%
Taylor expanded in z around inf 82.1%
unpow282.1%
Simplified82.1%
associate-/r*87.2%
div-inv87.2%
Applied egg-rr87.2%
if -1.65e54 < z < 9.2000000000000006e-110Initial program 93.6%
*-un-lft-identity93.6%
times-frac94.4%
Applied egg-rr94.4%
*-commutative94.4%
clear-num93.6%
frac-times93.5%
metadata-eval93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 65.9%
associate-/l*70.1%
Simplified70.1%
if 9.2000000000000006e-110 < z < 3.8e-13Initial program 99.7%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around 0 45.0%
associate-*r/45.0%
neg-mul-145.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in x around 0 45.0%
associate-/l/38.3%
associate-*r/38.3%
neg-mul-138.3%
distribute-neg-frac38.3%
Simplified38.3%
Taylor expanded in x around 0 45.0%
mul-1-neg45.0%
associate-/r*45.1%
distribute-neg-frac45.1%
Simplified45.1%
if 3.8e-13 < z < 1.1e10Initial program 84.2%
*-un-lft-identity84.2%
times-frac100.0%
Applied egg-rr100.0%
*-commutative100.0%
clear-num99.3%
frac-times99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 19.4%
associate-/r*50.8%
Simplified50.8%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.9e+54)
(/ 1.0 (/ z (/ x z)))
(if (<= z 9.2e-110)
(/ 1.0 (/ t (/ x y)))
(if (<= z 4.1e-13)
(/ (/ (- x) y) z)
(if (<= z 15000000000.0) (/ (/ x t) y) (* (/ x z) (/ 1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.9e+54) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 9.2e-110) {
tmp = 1.0 / (t / (x / y));
} else if (z <= 4.1e-13) {
tmp = (-x / y) / z;
} else if (z <= 15000000000.0) {
tmp = (x / t) / y;
} else {
tmp = (x / z) * (1.0 / 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.9d+54)) then
tmp = 1.0d0 / (z / (x / z))
else if (z <= 9.2d-110) then
tmp = 1.0d0 / (t / (x / y))
else if (z <= 4.1d-13) then
tmp = (-x / y) / z
else if (z <= 15000000000.0d0) then
tmp = (x / t) / y
else
tmp = (x / z) * (1.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.9e+54) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 9.2e-110) {
tmp = 1.0 / (t / (x / y));
} else if (z <= 4.1e-13) {
tmp = (-x / y) / z;
} else if (z <= 15000000000.0) {
tmp = (x / t) / y;
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.9e+54: tmp = 1.0 / (z / (x / z)) elif z <= 9.2e-110: tmp = 1.0 / (t / (x / y)) elif z <= 4.1e-13: tmp = (-x / y) / z elif z <= 15000000000.0: tmp = (x / t) / y else: tmp = (x / z) * (1.0 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.9e+54) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (z <= 9.2e-110) tmp = Float64(1.0 / Float64(t / Float64(x / y))); elseif (z <= 4.1e-13) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 15000000000.0) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.9e+54) tmp = 1.0 / (z / (x / z)); elseif (z <= 9.2e-110) tmp = 1.0 / (t / (x / y)); elseif (z <= 4.1e-13) tmp = (-x / y) / z; elseif (z <= 15000000000.0) tmp = (x / t) / y; else tmp = (x / z) * (1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.9e+54], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-110], N[(1.0 / N[(t / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-13], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 15000000000.0], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 15000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -2.8999999999999999e54Initial program 86.3%
Taylor expanded in z around inf 80.9%
unpow280.9%
Simplified80.9%
clear-num80.9%
inv-pow80.9%
associate-/l*82.9%
Applied egg-rr82.9%
unpow-182.9%
Simplified82.9%
if -2.8999999999999999e54 < z < 9.2000000000000006e-110Initial program 93.6%
*-un-lft-identity93.6%
times-frac94.4%
Applied egg-rr94.4%
*-commutative94.4%
clear-num93.6%
frac-times93.5%
metadata-eval93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 65.9%
associate-/l*70.1%
Simplified70.1%
if 9.2000000000000006e-110 < z < 4.1000000000000002e-13Initial program 99.7%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around 0 45.0%
associate-*r/45.0%
neg-mul-145.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in x around 0 45.0%
associate-/l/38.3%
associate-*r/38.3%
neg-mul-138.3%
distribute-neg-frac38.3%
Simplified38.3%
Taylor expanded in x around 0 45.0%
mul-1-neg45.0%
associate-/r*45.1%
distribute-neg-frac45.1%
Simplified45.1%
if 4.1000000000000002e-13 < z < 1.5e10Initial program 84.2%
*-un-lft-identity84.2%
times-frac100.0%
Applied egg-rr100.0%
*-commutative100.0%
clear-num99.3%
frac-times99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 19.4%
associate-/r*50.8%
Simplified50.8%
if 1.5e10 < z Initial program 90.2%
Taylor expanded in z around inf 82.9%
unpow282.9%
Simplified82.9%
associate-/r*89.8%
div-inv89.8%
Applied egg-rr89.8%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) t))))
(if (<= z -9e+54)
(/ 1.0 (/ z (/ x z)))
(if (<= z 5.5e-119)
t_1
(if (<= z 2.15e-10)
(/ x (* y (- t z)))
(if (<= z 15200000.0) t_1 (* (/ x z) (/ 1.0 z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -9e+54) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 5.5e-119) {
tmp = t_1;
} else if (z <= 2.15e-10) {
tmp = x / (y * (t - z));
} else if (z <= 15200000.0) {
tmp = t_1;
} else {
tmp = (x / z) * (1.0 / 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 / ((y - z) * t)
if (z <= (-9d+54)) then
tmp = 1.0d0 / (z / (x / z))
else if (z <= 5.5d-119) then
tmp = t_1
else if (z <= 2.15d-10) then
tmp = x / (y * (t - z))
else if (z <= 15200000.0d0) then
tmp = t_1
else
tmp = (x / z) * (1.0d0 / z)
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 tmp;
if (z <= -9e+54) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 5.5e-119) {
tmp = t_1;
} else if (z <= 2.15e-10) {
tmp = x / (y * (t - z));
} else if (z <= 15200000.0) {
tmp = t_1;
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if z <= -9e+54: tmp = 1.0 / (z / (x / z)) elif z <= 5.5e-119: tmp = t_1 elif z <= 2.15e-10: tmp = x / (y * (t - z)) elif z <= 15200000.0: tmp = t_1 else: tmp = (x / z) * (1.0 / z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -9e+54) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (z <= 5.5e-119) tmp = t_1; elseif (z <= 2.15e-10) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (z <= 15200000.0) tmp = t_1; else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * t); tmp = 0.0; if (z <= -9e+54) tmp = 1.0 / (z / (x / z)); elseif (z <= 5.5e-119) tmp = t_1; elseif (z <= 2.15e-10) tmp = x / (y * (t - z)); elseif (z <= 15200000.0) tmp = t_1; else tmp = (x / z) * (1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+54], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-119], t$95$1, If[LessEqual[z, 2.15e-10], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 15200000.0], t$95$1, N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;z \leq 15200000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -8.99999999999999968e54Initial program 86.3%
Taylor expanded in z around inf 80.9%
unpow280.9%
Simplified80.9%
clear-num80.9%
inv-pow80.9%
associate-/l*82.9%
Applied egg-rr82.9%
unpow-182.9%
Simplified82.9%
if -8.99999999999999968e54 < z < 5.49999999999999959e-119 or 2.15000000000000007e-10 < z < 1.52e7Initial program 92.9%
Taylor expanded in t around inf 73.0%
if 5.49999999999999959e-119 < z < 2.15000000000000007e-10Initial program 99.7%
Taylor expanded in y around inf 66.0%
*-commutative66.0%
Simplified66.0%
if 1.52e7 < z Initial program 90.2%
Taylor expanded in z around inf 82.9%
unpow282.9%
Simplified82.9%
associate-/r*89.8%
div-inv89.8%
Applied egg-rr89.8%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (/ 1.0 z))) (t_2 (/ x (* y (- t z)))))
(if (<= t 2.3e-270)
t_2
(if (<= t 6.4e-217)
t_1
(if (<= t 7.6e-106)
t_2
(if (<= t 3500000000.0) t_1 (/ (/ x t) (- y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (1.0 / z);
double t_2 = x / (y * (t - z));
double tmp;
if (t <= 2.3e-270) {
tmp = t_2;
} else if (t <= 6.4e-217) {
tmp = t_1;
} else if (t <= 7.6e-106) {
tmp = t_2;
} else if (t <= 3500000000.0) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) * (1.0d0 / z)
t_2 = x / (y * (t - z))
if (t <= 2.3d-270) then
tmp = t_2
else if (t <= 6.4d-217) then
tmp = t_1
else if (t <= 7.6d-106) then
tmp = t_2
else if (t <= 3500000000.0d0) then
tmp = t_1
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) * (1.0 / z);
double t_2 = x / (y * (t - z));
double tmp;
if (t <= 2.3e-270) {
tmp = t_2;
} else if (t <= 6.4e-217) {
tmp = t_1;
} else if (t <= 7.6e-106) {
tmp = t_2;
} else if (t <= 3500000000.0) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) * (1.0 / z) t_2 = x / (y * (t - z)) tmp = 0 if t <= 2.3e-270: tmp = t_2 elif t <= 6.4e-217: tmp = t_1 elif t <= 7.6e-106: tmp = t_2 elif t <= 3500000000.0: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(1.0 / z)) t_2 = Float64(x / Float64(y * Float64(t - z))) tmp = 0.0 if (t <= 2.3e-270) tmp = t_2; elseif (t <= 6.4e-217) tmp = t_1; elseif (t <= 7.6e-106) tmp = t_2; elseif (t <= 3500000000.0) tmp = t_1; 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) * (1.0 / z); t_2 = x / (y * (t - z)); tmp = 0.0; if (t <= 2.3e-270) tmp = t_2; elseif (t <= 6.4e-217) tmp = t_1; elseif (t <= 7.6e-106) tmp = t_2; elseif (t <= 3500000000.0) tmp = t_1; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2.3e-270], t$95$2, If[LessEqual[t, 6.4e-217], t$95$1, If[LessEqual[t, 7.6e-106], t$95$2, If[LessEqual[t, 3500000000.0], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{1}{z}\\
t_2 := \frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{if}\;t \leq 2.3 \cdot 10^{-270}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-106}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3500000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.3000000000000001e-270 or 6.4000000000000002e-217 < t < 7.5999999999999999e-106Initial program 93.9%
Taylor expanded in y around inf 67.2%
*-commutative67.2%
Simplified67.2%
if 2.3000000000000001e-270 < t < 6.4000000000000002e-217 or 7.5999999999999999e-106 < t < 3.5e9Initial program 87.1%
Taylor expanded in z around inf 60.6%
unpow260.6%
Simplified60.6%
associate-/r*68.9%
div-inv68.9%
Applied egg-rr68.9%
if 3.5e9 < t Initial program 89.3%
Taylor expanded in t around inf 84.7%
associate-/r*87.7%
Simplified87.7%
Final simplification72.6%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.1e+58)
(/ 1.0 (/ z (/ x z)))
(if (<= z 9.2e-119)
(/ (/ x (- y z)) t)
(if (<= z 7.2e-6)
(/ (/ x y) (- t z))
(if (<= z 3.7e+67) (/ (/ x t) (- y z)) (* (/ x z) (/ 1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e+58) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 9.2e-119) {
tmp = (x / (y - z)) / t;
} else if (z <= 7.2e-6) {
tmp = (x / y) / (t - z);
} else if (z <= 3.7e+67) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.1d+58)) then
tmp = 1.0d0 / (z / (x / z))
else if (z <= 9.2d-119) then
tmp = (x / (y - z)) / t
else if (z <= 7.2d-6) then
tmp = (x / y) / (t - z)
else if (z <= 3.7d+67) then
tmp = (x / t) / (y - z)
else
tmp = (x / z) * (1.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e+58) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 9.2e-119) {
tmp = (x / (y - z)) / t;
} else if (z <= 7.2e-6) {
tmp = (x / y) / (t - z);
} else if (z <= 3.7e+67) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.1e+58: tmp = 1.0 / (z / (x / z)) elif z <= 9.2e-119: tmp = (x / (y - z)) / t elif z <= 7.2e-6: tmp = (x / y) / (t - z) elif z <= 3.7e+67: tmp = (x / t) / (y - z) else: tmp = (x / z) * (1.0 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.1e+58) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (z <= 9.2e-119) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (z <= 7.2e-6) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (z <= 3.7e+67) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.1e+58) tmp = 1.0 / (z / (x / z)); elseif (z <= 9.2e-119) tmp = (x / (y - z)) / t; elseif (z <= 7.2e-6) tmp = (x / y) / (t - z); elseif (z <= 3.7e+67) tmp = (x / t) / (y - z); else tmp = (x / z) * (1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.1e+58], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-119], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 7.2e-6], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+67], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+58}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-119}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -1.1e58Initial program 86.3%
Taylor expanded in z around inf 80.9%
unpow280.9%
Simplified80.9%
clear-num80.9%
inv-pow80.9%
associate-/l*82.9%
Applied egg-rr82.9%
unpow-182.9%
Simplified82.9%
if -1.1e58 < z < 9.19999999999999973e-119Initial program 93.3%
Taylor expanded in t around inf 74.0%
*-commutative74.0%
associate-/r*77.5%
Simplified77.5%
if 9.19999999999999973e-119 < z < 7.19999999999999967e-6Initial program 99.7%
*-un-lft-identity99.7%
times-frac90.5%
Applied egg-rr90.5%
*-commutative90.5%
clear-num90.6%
frac-times90.6%
metadata-eval90.6%
Applied egg-rr90.6%
Taylor expanded in y around inf 67.6%
associate-/r*67.6%
Simplified67.6%
if 7.19999999999999967e-6 < z < 3.6999999999999997e67Initial program 84.2%
Taylor expanded in t around inf 36.1%
associate-/r*43.9%
Simplified43.9%
if 3.6999999999999997e67 < z Initial program 90.7%
Taylor expanded in z around inf 87.2%
unpow287.2%
Simplified87.2%
associate-/r*94.9%
div-inv94.8%
Applied egg-rr94.8%
Final simplification80.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z z))) (t_2 (/ (/ x t) y)))
(if (<= z -1.65e+54)
t_1
(if (<= z 5.1e-110)
t_2
(if (<= z 3.05e-12)
(/ (/ (- x) y) z)
(if (<= z 14000000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double t_2 = (x / t) / y;
double tmp;
if (z <= -1.65e+54) {
tmp = t_1;
} else if (z <= 5.1e-110) {
tmp = t_2;
} else if (z <= 3.05e-12) {
tmp = (-x / y) / z;
} else if (z <= 14000000000.0) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x / (z * z)
t_2 = (x / t) / y
if (z <= (-1.65d+54)) then
tmp = t_1
else if (z <= 5.1d-110) then
tmp = t_2
else if (z <= 3.05d-12) then
tmp = (-x / y) / z
else if (z <= 14000000000.0d0) then
tmp = t_2
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);
double t_2 = (x / t) / y;
double tmp;
if (z <= -1.65e+54) {
tmp = t_1;
} else if (z <= 5.1e-110) {
tmp = t_2;
} else if (z <= 3.05e-12) {
tmp = (-x / y) / z;
} else if (z <= 14000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * z) t_2 = (x / t) / y tmp = 0 if z <= -1.65e+54: tmp = t_1 elif z <= 5.1e-110: tmp = t_2 elif z <= 3.05e-12: tmp = (-x / y) / z elif z <= 14000000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * z)) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -1.65e+54) tmp = t_1; elseif (z <= 5.1e-110) tmp = t_2; elseif (z <= 3.05e-12) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 14000000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * z); t_2 = (x / t) / y; tmp = 0.0; if (z <= -1.65e+54) tmp = t_1; elseif (z <= 5.1e-110) tmp = t_2; elseif (z <= 3.05e-12) tmp = (-x / y) / z; elseif (z <= 14000000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.65e+54], t$95$1, If[LessEqual[z, 5.1e-110], t$95$2, If[LessEqual[z, 3.05e-12], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 14000000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-110}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 14000000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.65e54 or 1.4e10 < z Initial program 88.7%
Taylor expanded in z around inf 82.1%
unpow282.1%
Simplified82.1%
if -1.65e54 < z < 5.1000000000000002e-110 or 3.0500000000000001e-12 < z < 1.4e10Initial program 93.2%
*-un-lft-identity93.2%
times-frac94.7%
Applied egg-rr94.7%
*-commutative94.7%
clear-num93.8%
frac-times93.7%
metadata-eval93.7%
Applied egg-rr93.7%
Taylor expanded in z around 0 63.4%
associate-/r*67.8%
Simplified67.8%
if 5.1000000000000002e-110 < z < 3.0500000000000001e-12Initial program 99.7%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around 0 45.0%
associate-*r/45.0%
neg-mul-145.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in x around 0 45.0%
associate-/l/38.3%
associate-*r/38.3%
neg-mul-138.3%
distribute-neg-frac38.3%
Simplified38.3%
Taylor expanded in x around 0 45.0%
mul-1-neg45.0%
associate-/r*45.1%
distribute-neg-frac45.1%
Simplified45.1%
Final simplification72.8%
(FPCore (x y z t) :precision binary64 (if (<= y -9.2e-29) (/ x (* y (- t z))) (if (<= y 5.4e-196) (* (/ x (- t z)) (/ -1.0 z)) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e-29) {
tmp = x / (y * (t - z));
} else if (y <= 5.4e-196) {
tmp = (x / (t - z)) * (-1.0 / 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.2d-29)) then
tmp = x / (y * (t - z))
else if (y <= 5.4d-196) then
tmp = (x / (t - z)) * ((-1.0d0) / 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.2e-29) {
tmp = x / (y * (t - z));
} else if (y <= 5.4e-196) {
tmp = (x / (t - z)) * (-1.0 / z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.2e-29: tmp = x / (y * (t - z)) elif y <= 5.4e-196: tmp = (x / (t - z)) * (-1.0 / z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.2e-29) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 5.4e-196) tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / 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.2e-29) tmp = x / (y * (t - z)); elseif (y <= 5.4e-196) tmp = (x / (t - z)) * (-1.0 / z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.2e-29], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-196], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -9.19999999999999965e-29Initial program 94.4%
Taylor expanded in y around inf 87.4%
*-commutative87.4%
Simplified87.4%
if -9.19999999999999965e-29 < y < 5.39999999999999963e-196Initial program 96.1%
*-un-lft-identity96.1%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in y around 0 86.9%
if 5.39999999999999963e-196 < y Initial program 85.7%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/r*61.0%
Simplified61.0%
Final simplification77.3%
(FPCore (x y z t) :precision binary64 (if (<= y -5e+34) (/ 1.0 (* y (/ (- t z) x))) (if (<= y 5.4e-196) (* (/ x (- t z)) (/ -1.0 z)) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e+34) {
tmp = 1.0 / (y * ((t - z) / x));
} else if (y <= 5.4e-196) {
tmp = (x / (t - z)) * (-1.0 / 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 <= (-5d+34)) then
tmp = 1.0d0 / (y * ((t - z) / x))
else if (y <= 5.4d-196) then
tmp = (x / (t - z)) * ((-1.0d0) / 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 <= -5e+34) {
tmp = 1.0 / (y * ((t - z) / x));
} else if (y <= 5.4e-196) {
tmp = (x / (t - z)) * (-1.0 / z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5e+34: tmp = 1.0 / (y * ((t - z) / x)) elif y <= 5.4e-196: tmp = (x / (t - z)) * (-1.0 / z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5e+34) tmp = Float64(1.0 / Float64(y * Float64(Float64(t - z) / x))); elseif (y <= 5.4e-196) tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / 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 <= -5e+34) tmp = 1.0 / (y * ((t - z) / x)); elseif (y <= 5.4e-196) tmp = (x / (t - z)) * (-1.0 / z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5e+34], N[(1.0 / N[(y * N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-196], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+34}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t - z}{x}}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -4.9999999999999998e34Initial program 94.6%
*-un-lft-identity94.6%
times-frac97.0%
Applied egg-rr97.0%
*-commutative97.0%
clear-num97.0%
frac-times97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Taylor expanded in y around inf 90.5%
associate-*r/92.2%
Simplified92.2%
if -4.9999999999999998e34 < y < 5.39999999999999963e-196Initial program 95.6%
*-un-lft-identity95.6%
times-frac96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 83.5%
if 5.39999999999999963e-196 < y Initial program 85.7%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/r*61.0%
Simplified61.0%
Final simplification77.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.42e-39) (/ x (* y (- t z))) (if (<= y 5.4e-196) (/ (- x) (* z (- t z))) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.42e-39) {
tmp = x / (y * (t - z));
} else if (y <= 5.4e-196) {
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 <= (-1.42d-39)) then
tmp = x / (y * (t - z))
else if (y <= 5.4d-196) 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 <= -1.42e-39) {
tmp = x / (y * (t - z));
} else if (y <= 5.4e-196) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.42e-39: tmp = x / (y * (t - z)) elif y <= 5.4e-196: tmp = -x / (z * (t - z)) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.42e-39) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 5.4e-196) tmp = Float64(Float64(-x) / Float64(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 <= -1.42e-39) tmp = x / (y * (t - z)); elseif (y <= 5.4e-196) tmp = -x / (z * (t - z)); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.42e-39], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-196], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -1.42000000000000005e-39Initial program 94.4%
Taylor expanded in y around inf 87.4%
*-commutative87.4%
Simplified87.4%
if -1.42000000000000005e-39 < y < 5.39999999999999963e-196Initial program 96.1%
Taylor expanded in y around 0 85.1%
associate-*r/85.1%
neg-mul-185.1%
Simplified85.1%
if 5.39999999999999963e-196 < y Initial program 85.7%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/r*61.0%
Simplified61.0%
Final simplification76.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.12e-35) (/ x (* y (- t z))) (if (<= y 1.6e-196) (/ (/ (- x) z) (- t z)) (/ (/ x (- y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.12e-35) {
tmp = x / (y * (t - z));
} else if (y <= 1.6e-196) {
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 <= (-1.12d-35)) then
tmp = x / (y * (t - z))
else if (y <= 1.6d-196) 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 <= -1.12e-35) {
tmp = x / (y * (t - z));
} else if (y <= 1.6e-196) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.12e-35: tmp = x / (y * (t - z)) elif y <= 1.6e-196: tmp = (-x / z) / (t - z) else: tmp = (x / (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.12e-35) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.6e-196) 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 <= -1.12e-35) tmp = x / (y * (t - z)); elseif (y <= 1.6e-196) tmp = (-x / z) / (t - z); else tmp = (x / (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.12e-35], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-196], 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 -1.12 \cdot 10^{-35}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -1.12e-35Initial program 94.4%
Taylor expanded in y around inf 87.4%
*-commutative87.4%
Simplified87.4%
if -1.12e-35 < y < 1.6e-196Initial program 96.1%
*-un-lft-identity96.1%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in y around 0 85.1%
mul-1-neg85.1%
associate-/r*87.5%
distribute-neg-frac87.5%
Simplified87.5%
if 1.6e-196 < y Initial program 85.7%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/r*61.0%
Simplified61.0%
Final simplification77.4%
(FPCore (x y z t) :precision binary64 (if (<= z -4.9e+58) (/ 1.0 (/ z (/ x z))) (if (<= z 50000000000.0) (/ x (* (- y z) t)) (* (/ x z) (/ 1.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.9e+58) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 50000000000.0) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / z) * (1.0 / 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 <= (-4.9d+58)) then
tmp = 1.0d0 / (z / (x / z))
else if (z <= 50000000000.0d0) then
tmp = x / ((y - z) * t)
else
tmp = (x / z) * (1.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.9e+58) {
tmp = 1.0 / (z / (x / z));
} else if (z <= 50000000000.0) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.9e+58: tmp = 1.0 / (z / (x / z)) elif z <= 50000000000.0: tmp = x / ((y - z) * t) else: tmp = (x / z) * (1.0 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.9e+58) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (z <= 50000000000.0) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.9e+58) tmp = 1.0 / (z / (x / z)); elseif (z <= 50000000000.0) tmp = x / ((y - z) * t); else tmp = (x / z) * (1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.9e+58], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 50000000000.0], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+58}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 50000000000:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -4.90000000000000018e58Initial program 86.3%
Taylor expanded in z around inf 80.9%
unpow280.9%
Simplified80.9%
clear-num80.9%
inv-pow80.9%
associate-/l*82.9%
Applied egg-rr82.9%
unpow-182.9%
Simplified82.9%
if -4.90000000000000018e58 < z < 5e10Initial program 93.8%
Taylor expanded in t around inf 69.7%
if 5e10 < z Initial program 90.2%
Taylor expanded in z around inf 82.9%
unpow282.9%
Simplified82.9%
associate-/r*89.8%
div-inv89.8%
Applied egg-rr89.8%
Final simplification77.3%
(FPCore (x y z t) :precision binary64 (if (<= t 3.6e+180) (/ x (* (- y z) (- t z))) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.6e+180) {
tmp = x / ((y - z) * (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 <= 3.6d+180) then
tmp = x / ((y - z) * (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 <= 3.6e+180) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 3.6e+180: tmp = x / ((y - z) * (t - z)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 3.6e+180) tmp = Float64(x / Float64(Float64(y - z) * 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 <= 3.6e+180) tmp = x / ((y - z) * (t - z)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.6e+180], N[(x / N[(N[(y - z), $MachinePrecision] * 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 3.6 \cdot 10^{+180}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 3.6000000000000002e180Initial program 92.8%
if 3.6000000000000002e180 < t Initial program 79.6%
Taylor expanded in t around inf 79.6%
associate-/r*95.8%
Simplified95.8%
Final simplification93.0%
(FPCore (x y z t) :precision binary64 (* (/ 1.0 (- y z)) (/ x (- t z))))
double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) * (x / (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 = (1.0d0 / (y - z)) * (x / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) * (x / (t - z));
}
def code(x, y, z, t): return (1.0 / (y - z)) * (x / (t - z))
function code(x, y, z, t) return Float64(Float64(1.0 / Float64(y - z)) * Float64(x / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = (1.0 / (y - z)) * (x / (t - z)); end
code[x_, y_, z_, t_] := N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y - z} \cdot \frac{x}{t - z}
\end{array}
Initial program 91.6%
*-un-lft-identity91.6%
times-frac96.5%
Applied egg-rr96.5%
Final simplification96.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.1e+101) (not (<= z 6e+67))) (/ x (* y z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e+101) || !(z <= 6e+67)) {
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 <= (-3.1d+101)) .or. (.not. (z <= 6d+67))) 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 <= -3.1e+101) || !(z <= 6e+67)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.1e+101) or not (z <= 6e+67): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.1e+101) || !(z <= 6e+67)) 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 <= -3.1e+101) || ~((z <= 6e+67))) tmp = x / (y * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.1e+101], N[Not[LessEqual[z, 6e+67]], $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 -3.1 \cdot 10^{+101} \lor \neg \left(z \leq 6 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.09999999999999999e101 or 6.0000000000000002e67 < z Initial program 88.9%
Taylor expanded in y around inf 45.1%
*-commutative45.1%
Simplified45.1%
Taylor expanded in t around 0 44.1%
associate-*r/44.1%
neg-mul-144.1%
*-commutative44.1%
Simplified44.1%
expm1-log1p-u43.9%
expm1-udef69.9%
add-sqr-sqrt37.9%
sqrt-unprod67.5%
sqr-neg67.5%
sqrt-unprod31.9%
add-sqr-sqrt69.8%
associate-/r*69.8%
Applied egg-rr69.8%
expm1-def52.6%
expm1-log1p52.9%
associate-/l/43.0%
*-commutative43.0%
Simplified43.0%
if -3.09999999999999999e101 < z < 6.0000000000000002e67Initial program 93.2%
Taylor expanded in z around 0 53.7%
Final simplification49.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -9000000000000.0) (not (<= z 9.2e-110))) (/ x (* z z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9000000000000.0) || !(z <= 9.2e-110)) {
tmp = x / (z * 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 <= (-9000000000000.0d0)) .or. (.not. (z <= 9.2d-110))) then
tmp = x / (z * 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 <= -9000000000000.0) || !(z <= 9.2e-110)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -9000000000000.0) or not (z <= 9.2e-110): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -9000000000000.0) || !(z <= 9.2e-110)) tmp = Float64(x / Float64(z * 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 <= -9000000000000.0) || ~((z <= 9.2e-110))) tmp = x / (z * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9000000000000.0], N[Not[LessEqual[z, 9.2e-110]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9000000000000 \lor \neg \left(z \leq 9.2 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -9e12 or 9.2000000000000006e-110 < z Initial program 89.3%
Taylor expanded in z around inf 69.7%
unpow269.7%
Simplified69.7%
if -9e12 < z < 9.2000000000000006e-110Initial program 94.7%
Taylor expanded in z around 0 70.7%
Final simplification70.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.15e+58) (not (<= z 9.2e-110))) (/ x (* z z)) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.15e+58) || !(z <= 9.2e-110)) {
tmp = x / (z * 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 <= (-1.15d+58)) .or. (.not. (z <= 9.2d-110))) then
tmp = x / (z * 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 <= -1.15e+58) || !(z <= 9.2e-110)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.15e+58) or not (z <= 9.2e-110): tmp = x / (z * z) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.15e+58) || !(z <= 9.2e-110)) tmp = Float64(x / Float64(z * 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 <= -1.15e+58) || ~((z <= 9.2e-110))) tmp = x / (z * z); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.15e+58], N[Not[LessEqual[z, 9.2e-110]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+58} \lor \neg \left(z \leq 9.2 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.15000000000000001e58 or 9.2000000000000006e-110 < z Initial program 89.7%
Taylor expanded in z around inf 74.2%
unpow274.2%
Simplified74.2%
if -1.15000000000000001e58 < z < 9.2000000000000006e-110Initial program 93.6%
*-un-lft-identity93.6%
times-frac94.4%
Applied egg-rr94.4%
*-commutative94.4%
clear-num93.6%
frac-times93.5%
metadata-eval93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 65.5%
associate-/r*68.6%
Simplified68.6%
Final simplification71.5%
(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.6%
Taylor expanded in z around 0 41.4%
Final simplification41.4%
(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 2023275
(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))))