
(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 17 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 1e-306) (/ (/ x (- t z)) (- y 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 <= 1e-306) {
tmp = (x / (t - z)) / (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 / ((y - z) * (t - z))
if (t_1 <= 1d-306) then
tmp = (x / (t - z)) / (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 / ((y - z) * (t - z));
double tmp;
if (t_1 <= 1e-306) {
tmp = (x / (t - z)) / (y - 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 <= 1e-306: tmp = (x / (t - z)) / (y - 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 <= 1e-306) tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - 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 <= 1e-306) tmp = (x / (t - z)) / (y - 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, 1e-306], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - 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 10^{-306}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 1.00000000000000003e-306Initial program 88.3%
associate-/l/99.8%
Simplified99.8%
if 1.00000000000000003e-306 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.7%
(FPCore (x y z t) :precision binary64 (* (/ (pow (cbrt x) 2.0) (- y z)) (/ (cbrt x) (- t z))))
double code(double x, double y, double z, double t) {
return (pow(cbrt(x), 2.0) / (y - z)) * (cbrt(x) / (t - z));
}
public static double code(double x, double y, double z, double t) {
return (Math.pow(Math.cbrt(x), 2.0) / (y - z)) * (Math.cbrt(x) / (t - z));
}
function code(x, y, z, t) return Float64(Float64((cbrt(x) ^ 2.0) / Float64(y - z)) * Float64(cbrt(x) / Float64(t - z))) end
code[x_, y_, z_, t_] := N[(N[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}
\end{array}
Initial program 91.9%
add-cube-cbrt91.1%
times-frac97.1%
pow297.1%
Applied egg-rr97.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.2e+124)
(/ (/ x z) z)
(if (or (<= z -1.44e-133) (not (<= z 2.15e-38)))
(/ x (* z (- z y)))
(/ (/ x y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.2e+124) {
tmp = (x / z) / z;
} else if ((z <= -1.44e-133) || !(z <= 2.15e-38)) {
tmp = x / (z * (z - y));
} 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.2d+124)) then
tmp = (x / z) / z
else if ((z <= (-1.44d-133)) .or. (.not. (z <= 2.15d-38))) then
tmp = x / (z * (z - y))
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.2e+124) {
tmp = (x / z) / z;
} else if ((z <= -1.44e-133) || !(z <= 2.15e-38)) {
tmp = x / (z * (z - y));
} else {
tmp = (x / y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.2e+124: tmp = (x / z) / z elif (z <= -1.44e-133) or not (z <= 2.15e-38): tmp = x / (z * (z - y)) else: tmp = (x / y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.2e+124) tmp = Float64(Float64(x / z) / z); elseif ((z <= -1.44e-133) || !(z <= 2.15e-38)) tmp = Float64(x / Float64(z * Float64(z - y))); 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.2e+124) tmp = (x / z) / z; elseif ((z <= -1.44e-133) || ~((z <= 2.15e-38))) tmp = x / (z * (z - y)); else tmp = (x / y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.2e+124], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, -1.44e-133], N[Not[LessEqual[z, 2.15e-38]], $MachinePrecision]], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+124}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -1.44 \cdot 10^{-133} \lor \neg \left(z \leq 2.15 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -3.19999999999999993e124Initial program 76.4%
Taylor expanded in t around 0 76.4%
mul-1-neg76.4%
associate-/r*97.3%
distribute-neg-frac297.3%
neg-sub097.3%
sub-neg97.3%
+-commutative97.3%
associate--r+97.3%
neg-sub097.3%
remove-double-neg97.3%
Simplified97.3%
Taylor expanded in z around inf 95.0%
if -3.19999999999999993e124 < z < -1.43999999999999996e-133 or 2.1500000000000001e-38 < z Initial program 93.8%
Taylor expanded in t around 0 65.9%
mul-1-neg65.9%
distribute-rgt-neg-in65.9%
neg-sub065.9%
sub-neg65.9%
+-commutative65.9%
associate--r+65.9%
neg-sub065.9%
remove-double-neg65.9%
Simplified65.9%
if -1.43999999999999996e-133 < z < 2.1500000000000001e-38Initial program 95.7%
Taylor expanded in y around inf 80.6%
associate-/r*76.6%
Simplified76.6%
Taylor expanded in t around inf 66.2%
Final simplification70.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.9e+50)
(/ 1.0 (* (- t z) (/ y x)))
(if (<= y -3.3e-106)
(/ (/ x z) (- z y))
(if (<= y 6.4e-167) (/ (/ x z) (- z t)) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+50) {
tmp = 1.0 / ((t - z) * (y / x));
} else if (y <= -3.3e-106) {
tmp = (x / z) / (z - y);
} else if (y <= 6.4e-167) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.9d+50)) then
tmp = 1.0d0 / ((t - z) * (y / x))
else if (y <= (-3.3d-106)) then
tmp = (x / z) / (z - y)
else if (y <= 6.4d-167) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+50) {
tmp = 1.0 / ((t - z) * (y / x));
} else if (y <= -3.3e-106) {
tmp = (x / z) / (z - y);
} else if (y <= 6.4e-167) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e+50: tmp = 1.0 / ((t - z) * (y / x)) elif y <= -3.3e-106: tmp = (x / z) / (z - y) elif y <= 6.4e-167: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e+50) tmp = Float64(1.0 / Float64(Float64(t - z) * Float64(y / x))); elseif (y <= -3.3e-106) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (y <= 6.4e-167) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e+50) tmp = 1.0 / ((t - z) * (y / x)); elseif (y <= -3.3e-106) tmp = (x / z) / (z - y); elseif (y <= 6.4e-167) tmp = (x / z) / (z - t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e+50], N[(1.0 / N[(N[(t - z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-106], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e-167], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+50}:\\
\;\;\;\;\frac{1}{\left(t - z\right) \cdot \frac{y}{x}}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-167}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.9e50Initial program 93.7%
Taylor expanded in y around inf 89.1%
associate-/r*91.9%
Simplified91.9%
clear-num92.5%
inv-pow92.5%
div-inv92.5%
clear-num92.5%
Applied egg-rr92.5%
unpow-192.5%
Simplified92.5%
if -2.9e50 < y < -3.30000000000000016e-106Initial program 94.2%
Taylor expanded in t around 0 63.3%
mul-1-neg63.3%
associate-/r*68.9%
distribute-neg-frac268.9%
neg-sub068.9%
sub-neg68.9%
+-commutative68.9%
associate--r+68.9%
neg-sub068.9%
remove-double-neg68.9%
Simplified68.9%
if -3.30000000000000016e-106 < y < 6.4000000000000003e-167Initial program 89.8%
Taylor expanded in y around 0 77.5%
mul-1-neg77.5%
associate-/r*86.2%
distribute-neg-frac286.2%
sub-neg86.2%
+-commutative86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
unsub-neg86.2%
Simplified86.2%
if 6.4000000000000003e-167 < y Initial program 91.8%
associate-/l/98.9%
Simplified98.9%
Taylor expanded in t around inf 63.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e+49)
(/ (/ x y) (- t z))
(if (<= y -7.5e-106)
(/ (/ x z) (- z y))
(if (<= y 2.1e-166) (/ (/ x z) (- z t)) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+49) {
tmp = (x / y) / (t - z);
} else if (y <= -7.5e-106) {
tmp = (x / z) / (z - y);
} else if (y <= 2.1e-166) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.5d+49)) then
tmp = (x / y) / (t - z)
else if (y <= (-7.5d-106)) then
tmp = (x / z) / (z - y)
else if (y <= 2.1d-166) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+49) {
tmp = (x / y) / (t - z);
} else if (y <= -7.5e-106) {
tmp = (x / z) / (z - y);
} else if (y <= 2.1e-166) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+49: tmp = (x / y) / (t - z) elif y <= -7.5e-106: tmp = (x / z) / (z - y) elif y <= 2.1e-166: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+49) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -7.5e-106) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (y <= 2.1e-166) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+49) tmp = (x / y) / (t - z); elseif (y <= -7.5e-106) tmp = (x / z) / (z - y); elseif (y <= 2.1e-166) tmp = (x / z) / (z - t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+49], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-106], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-166], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+49}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-166}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.4999999999999995e49Initial program 93.7%
Taylor expanded in y around inf 89.1%
associate-/r*91.9%
Simplified91.9%
if -7.4999999999999995e49 < y < -7.5000000000000002e-106Initial program 94.2%
Taylor expanded in t around 0 63.3%
mul-1-neg63.3%
associate-/r*68.9%
distribute-neg-frac268.9%
neg-sub068.9%
sub-neg68.9%
+-commutative68.9%
associate--r+68.9%
neg-sub068.9%
remove-double-neg68.9%
Simplified68.9%
if -7.5000000000000002e-106 < y < 2.0999999999999999e-166Initial program 89.8%
Taylor expanded in y around 0 77.5%
mul-1-neg77.5%
associate-/r*86.2%
distribute-neg-frac286.2%
sub-neg86.2%
+-commutative86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
unsub-neg86.2%
Simplified86.2%
if 2.0999999999999999e-166 < y Initial program 91.8%
associate-/l/98.9%
Simplified98.9%
Taylor expanded in t around inf 63.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -36000000000000.0)
t_1
(if (<= z -1e-76)
(/ (/ x z) (- y))
(if (<= z 2e+21) (/ (/ x y) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -36000000000000.0) {
tmp = t_1;
} else if (z <= -1e-76) {
tmp = (x / z) / -y;
} else if (z <= 2e+21) {
tmp = (x / y) / 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) / z
if (z <= (-36000000000000.0d0)) then
tmp = t_1
else if (z <= (-1d-76)) then
tmp = (x / z) / -y
else if (z <= 2d+21) then
tmp = (x / y) / 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) / z;
double tmp;
if (z <= -36000000000000.0) {
tmp = t_1;
} else if (z <= -1e-76) {
tmp = (x / z) / -y;
} else if (z <= 2e+21) {
tmp = (x / y) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -36000000000000.0: tmp = t_1 elif z <= -1e-76: tmp = (x / z) / -y elif z <= 2e+21: tmp = (x / y) / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -36000000000000.0) tmp = t_1; elseif (z <= -1e-76) tmp = Float64(Float64(x / z) / Float64(-y)); elseif (z <= 2e+21) tmp = Float64(Float64(x / y) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) / z; tmp = 0.0; if (z <= -36000000000000.0) tmp = t_1; elseif (z <= -1e-76) tmp = (x / z) / -y; elseif (z <= 2e+21) tmp = (x / y) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -36000000000000.0], t$95$1, If[LessEqual[z, -1e-76], N[(N[(x / z), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[z, 2e+21], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -36000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{x}{z}}{-y}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6e13 or 2e21 < z Initial program 84.6%
Taylor expanded in t around 0 79.2%
mul-1-neg79.2%
associate-/r*91.6%
distribute-neg-frac291.6%
neg-sub091.6%
sub-neg91.6%
+-commutative91.6%
associate--r+91.6%
neg-sub091.6%
remove-double-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 84.0%
if -3.6e13 < z < -9.99999999999999927e-77Initial program 99.6%
Taylor expanded in t around 0 59.5%
mul-1-neg59.5%
associate-/r*59.3%
distribute-neg-frac259.3%
neg-sub059.3%
sub-neg59.3%
+-commutative59.3%
associate--r+59.3%
neg-sub059.3%
remove-double-neg59.3%
Simplified59.3%
Taylor expanded in z around 0 42.1%
neg-mul-142.1%
Simplified42.1%
if -9.99999999999999927e-77 < z < 2e21Initial program 96.1%
Taylor expanded in y around inf 74.8%
associate-/r*72.5%
Simplified72.5%
Taylor expanded in t around inf 59.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -5.2e+14)
t_1
(if (<= z -6.3e-71)
(/ (- x) (* y z))
(if (<= z 1.75e+21) (/ (/ x y) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -5.2e+14) {
tmp = t_1;
} else if (z <= -6.3e-71) {
tmp = -x / (y * z);
} else if (z <= 1.75e+21) {
tmp = (x / y) / 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) / z
if (z <= (-5.2d+14)) then
tmp = t_1
else if (z <= (-6.3d-71)) then
tmp = -x / (y * z)
else if (z <= 1.75d+21) then
tmp = (x / y) / 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) / z;
double tmp;
if (z <= -5.2e+14) {
tmp = t_1;
} else if (z <= -6.3e-71) {
tmp = -x / (y * z);
} else if (z <= 1.75e+21) {
tmp = (x / y) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -5.2e+14: tmp = t_1 elif z <= -6.3e-71: tmp = -x / (y * z) elif z <= 1.75e+21: tmp = (x / y) / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -5.2e+14) tmp = t_1; elseif (z <= -6.3e-71) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= 1.75e+21) tmp = Float64(Float64(x / y) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) / z; tmp = 0.0; if (z <= -5.2e+14) tmp = t_1; elseif (z <= -6.3e-71) tmp = -x / (y * z); elseif (z <= 1.75e+21) tmp = (x / y) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -5.2e+14], t$95$1, If[LessEqual[z, -6.3e-71], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+21], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.2e14 or 1.75e21 < z Initial program 84.6%
Taylor expanded in t around 0 79.2%
mul-1-neg79.2%
associate-/r*91.6%
distribute-neg-frac291.6%
neg-sub091.6%
sub-neg91.6%
+-commutative91.6%
associate--r+91.6%
neg-sub091.6%
remove-double-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 84.0%
if -5.2e14 < z < -6.3000000000000003e-71Initial program 99.6%
Taylor expanded in y around inf 59.5%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in t around 0 42.1%
associate-*r/42.1%
neg-mul-142.1%
*-commutative42.1%
Simplified42.1%
if -6.3000000000000003e-71 < z < 1.75e21Initial program 96.1%
Taylor expanded in y around inf 74.8%
associate-/r*72.5%
Simplified72.5%
Taylor expanded in t around inf 59.4%
Final simplification67.8%
(FPCore (x y z t) :precision binary64 (if (<= z -4.7e+123) (/ (/ x z) (- z y)) (if (<= z 2.9e+21) (/ x (* (- y z) (- t z))) (/ (/ x z) (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.7e+123) {
tmp = (x / z) / (z - y);
} else if (z <= 2.9e+21) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.7d+123)) then
tmp = (x / z) / (z - y)
else if (z <= 2.9d+21) then
tmp = x / ((y - z) * (t - z))
else
tmp = (x / z) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.7e+123) {
tmp = (x / z) / (z - y);
} else if (z <= 2.9e+21) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.7e+123: tmp = (x / z) / (z - y) elif z <= 2.9e+21: tmp = x / ((y - z) * (t - z)) else: tmp = (x / z) / (z - t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.7e+123) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 2.9e+21) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.7e+123) tmp = (x / z) / (z - y); elseif (z <= 2.9e+21) tmp = x / ((y - z) * (t - z)); else tmp = (x / z) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.7e+123], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+21], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+123}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -4.69999999999999979e123Initial program 76.4%
Taylor expanded in t around 0 76.4%
mul-1-neg76.4%
associate-/r*97.3%
distribute-neg-frac297.3%
neg-sub097.3%
sub-neg97.3%
+-commutative97.3%
associate--r+97.3%
neg-sub097.3%
remove-double-neg97.3%
Simplified97.3%
if -4.69999999999999979e123 < z < 2.9e21Initial program 96.3%
if 2.9e21 < z Initial program 87.8%
Taylor expanded in y around 0 85.5%
mul-1-neg85.5%
associate-/r*97.6%
distribute-neg-frac297.6%
sub-neg97.6%
+-commutative97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
unsub-neg97.6%
Simplified97.6%
(FPCore (x y z t) :precision binary64 (if (<= y -7.3e-106) (/ (/ x y) (- t z)) (if (<= y 2.1e-166) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.3e-106) {
tmp = (x / y) / (t - z);
} else if (y <= 2.1e-166) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.3d-106)) then
tmp = (x / y) / (t - z)
else if (y <= 2.1d-166) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.3e-106) {
tmp = (x / y) / (t - z);
} else if (y <= 2.1e-166) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.3e-106: tmp = (x / y) / (t - z) elif y <= 2.1e-166: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.3e-106) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2.1e-166) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.3e-106) tmp = (x / y) / (t - z); elseif (y <= 2.1e-166) tmp = (x / z) / (z - t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.3e-106], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-166], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-166}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.29999999999999992e-106Initial program 93.9%
Taylor expanded in y around inf 78.3%
associate-/r*77.6%
Simplified77.6%
if -7.29999999999999992e-106 < y < 2.0999999999999999e-166Initial program 89.8%
Taylor expanded in y around 0 77.5%
mul-1-neg77.5%
associate-/r*86.2%
distribute-neg-frac286.2%
sub-neg86.2%
+-commutative86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
unsub-neg86.2%
Simplified86.2%
if 2.0999999999999999e-166 < y Initial program 91.8%
associate-/l/98.9%
Simplified98.9%
Taylor expanded in t around inf 63.2%
(FPCore (x y z t) :precision binary64 (if (<= t -1.72e-175) (/ (/ x y) (- t z)) (if (<= t 8.8e-60) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.72e-175) {
tmp = (x / y) / (t - z);
} else if (t <= 8.8e-60) {
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.72d-175)) then
tmp = (x / y) / (t - z)
else if (t <= 8.8d-60) 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.72e-175) {
tmp = (x / y) / (t - z);
} else if (t <= 8.8e-60) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.72e-175: tmp = (x / y) / (t - z) elif t <= 8.8e-60: 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.72e-175) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 8.8e-60) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.72e-175) tmp = (x / y) / (t - z); elseif (t <= 8.8e-60) 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.72e-175], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e-60], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.72 \cdot 10^{-175}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.72000000000000005e-175Initial program 89.8%
Taylor expanded in y around inf 58.3%
associate-/r*57.5%
Simplified57.5%
if -1.72000000000000005e-175 < t < 8.7999999999999995e-60Initial program 95.6%
Taylor expanded in t around 0 82.7%
mul-1-neg82.7%
distribute-rgt-neg-in82.7%
neg-sub082.7%
sub-neg82.7%
+-commutative82.7%
associate--r+82.7%
neg-sub082.7%
remove-double-neg82.7%
Simplified82.7%
if 8.7999999999999995e-60 < t Initial program 90.1%
Taylor expanded in t around inf 78.5%
(FPCore (x y z t) :precision binary64 (if (<= t -4.3e-81) (/ (/ x t) (- y z)) (if (<= t 2.5e-59) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.3e-81) {
tmp = (x / t) / (y - z);
} else if (t <= 2.5e-59) {
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 <= (-4.3d-81)) then
tmp = (x / t) / (y - z)
else if (t <= 2.5d-59) 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 <= -4.3e-81) {
tmp = (x / t) / (y - z);
} else if (t <= 2.5e-59) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.3e-81: tmp = (x / t) / (y - z) elif t <= 2.5e-59: tmp = x / (z * (z - y)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.3e-81) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (t <= 2.5e-59) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4.3e-81) tmp = (x / t) / (y - z); elseif (t <= 2.5e-59) tmp = x / (z * (z - y)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.3e-81], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-59], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -4.3000000000000003e-81Initial program 90.9%
associate-/l/96.5%
Simplified96.5%
Taylor expanded in t around inf 86.8%
if -4.3000000000000003e-81 < t < 2.5000000000000001e-59Initial program 93.9%
Taylor expanded in t around 0 79.8%
mul-1-neg79.8%
distribute-rgt-neg-in79.8%
neg-sub079.8%
sub-neg79.8%
+-commutative79.8%
associate--r+79.8%
neg-sub079.8%
remove-double-neg79.8%
Simplified79.8%
if 2.5000000000000001e-59 < t Initial program 90.1%
Taylor expanded in t around inf 78.5%
(FPCore (x y z t) :precision binary64 (if (<= t -9.5e-76) (/ (/ x y) t) (if (<= t 2.75e-59) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9.5e-76) {
tmp = (x / y) / t;
} else if (t <= 2.75e-59) {
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 <= (-9.5d-76)) then
tmp = (x / y) / t
else if (t <= 2.75d-59) 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 <= -9.5e-76) {
tmp = (x / y) / t;
} else if (t <= 2.75e-59) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -9.5e-76: tmp = (x / y) / t elif t <= 2.75e-59: tmp = x / (z * (z - y)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -9.5e-76) tmp = Float64(Float64(x / y) / t); elseif (t <= 2.75e-59) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -9.5e-76) tmp = (x / y) / t; elseif (t <= 2.75e-59) tmp = x / (z * (z - y)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -9.5e-76], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.75e-59], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-76}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -9.49999999999999984e-76Initial program 90.9%
Taylor expanded in y around inf 61.0%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around inf 57.2%
if -9.49999999999999984e-76 < t < 2.75000000000000007e-59Initial program 93.9%
Taylor expanded in t around 0 79.8%
mul-1-neg79.8%
distribute-rgt-neg-in79.8%
neg-sub079.8%
sub-neg79.8%
+-commutative79.8%
associate--r+79.8%
neg-sub079.8%
remove-double-neg79.8%
Simplified79.8%
if 2.75000000000000007e-59 < t Initial program 90.1%
Taylor expanded in t around inf 78.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.35e-20) (not (<= z 1.45e+21))) (/ (/ x z) z) (/ (/ x y) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.35e-20) || !(z <= 1.45e+21)) {
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 <= (-1.35d-20)) .or. (.not. (z <= 1.45d+21))) 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 <= -1.35e-20) || !(z <= 1.45e+21)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.35e-20) or not (z <= 1.45e+21): tmp = (x / z) / z else: tmp = (x / y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.35e-20) || !(z <= 1.45e+21)) tmp = Float64(Float64(x / z) / 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 <= -1.35e-20) || ~((z <= 1.45e+21))) tmp = (x / z) / z; else tmp = (x / y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.35e-20], N[Not[LessEqual[z, 1.45e+21]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-20} \lor \neg \left(z \leq 1.45 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -1.35e-20 or 1.45e21 < z Initial program 86.0%
Taylor expanded in t around 0 79.3%
mul-1-neg79.3%
associate-/r*90.5%
distribute-neg-frac290.5%
neg-sub090.5%
sub-neg90.5%
+-commutative90.5%
associate--r+90.5%
neg-sub090.5%
remove-double-neg90.5%
Simplified90.5%
Taylor expanded in z around inf 79.2%
if -1.35e-20 < z < 1.45e21Initial program 96.3%
Taylor expanded in y around inf 74.0%
associate-/r*71.8%
Simplified71.8%
Taylor expanded in t around inf 58.0%
Final simplification67.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.02e-19) (not (<= z 1.12e+21))) (/ x (* z z)) (/ (/ x y) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e-19) || !(z <= 1.12e+21)) {
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 <= (-1.02d-19)) .or. (.not. (z <= 1.12d+21))) 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 <= -1.02e-19) || !(z <= 1.12e+21)) {
tmp = x / (z * z);
} else {
tmp = (x / y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.02e-19) or not (z <= 1.12e+21): tmp = x / (z * z) else: tmp = (x / y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.02e-19) || !(z <= 1.12e+21)) tmp = Float64(x / Float64(z * 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 <= -1.02e-19) || ~((z <= 1.12e+21))) tmp = x / (z * z); else tmp = (x / y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.02e-19], N[Not[LessEqual[z, 1.12e+21]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-19} \lor \neg \left(z \leq 1.12 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -1.02000000000000004e-19 or 1.12e21 < z Initial program 86.0%
Taylor expanded in t around 0 79.3%
mul-1-neg79.3%
distribute-rgt-neg-in79.3%
neg-sub079.3%
sub-neg79.3%
+-commutative79.3%
associate--r+79.3%
neg-sub079.3%
remove-double-neg79.3%
Simplified79.3%
Taylor expanded in z around inf 68.9%
if -1.02000000000000004e-19 < z < 1.12e21Initial program 96.3%
Taylor expanded in y around inf 74.0%
associate-/r*71.8%
Simplified71.8%
Taylor expanded in t around inf 58.0%
Final simplification62.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -9e-21) (not (<= z 3.8e-12))) (/ x (* z z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9e-21) || !(z <= 3.8e-12)) {
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 <= (-9d-21)) .or. (.not. (z <= 3.8d-12))) 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 <= -9e-21) || !(z <= 3.8e-12)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -9e-21) or not (z <= 3.8e-12): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -9e-21) || !(z <= 3.8e-12)) 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 <= -9e-21) || ~((z <= 3.8e-12))) tmp = x / (z * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9e-21], N[Not[LessEqual[z, 3.8e-12]], $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 -9 \cdot 10^{-21} \lor \neg \left(z \leq 3.8 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -8.99999999999999936e-21 or 3.79999999999999996e-12 < z Initial program 86.9%
Taylor expanded in t around 0 76.5%
mul-1-neg76.5%
distribute-rgt-neg-in76.5%
neg-sub076.5%
sub-neg76.5%
+-commutative76.5%
associate--r+76.5%
neg-sub076.5%
remove-double-neg76.5%
Simplified76.5%
Taylor expanded in z around inf 64.2%
if -8.99999999999999936e-21 < z < 3.79999999999999996e-12Initial program 96.6%
Taylor expanded in z around 0 63.0%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.05e+22) (not (<= z 3.35e+19))) (/ x (* z t)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.05e+22) || !(z <= 3.35e+19)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2.05d+22)) .or. (.not. (z <= 3.35d+19))) then
tmp = x / (z * t)
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.05e+22) || !(z <= 3.35e+19)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.05e+22) or not (z <= 3.35e+19): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.05e+22) || !(z <= 3.35e+19)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.05e+22) || ~((z <= 3.35e+19))) tmp = x / (z * t); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.05e+22], N[Not[LessEqual[z, 3.35e+19]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+22} \lor \neg \left(z \leq 3.35 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -2.0499999999999999e22 or 3.35e19 < z Initial program 84.5%
Taylor expanded in t around inf 46.2%
Taylor expanded in y around 0 43.4%
associate-*r/43.4%
neg-mul-143.4%
Simplified43.4%
neg-sub043.4%
sub-neg43.4%
add-sqr-sqrt29.8%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod11.8%
add-sqr-sqrt40.7%
Applied egg-rr40.7%
+-lft-identity40.7%
Simplified40.7%
if -2.0499999999999999e22 < z < 3.35e19Initial program 96.5%
Taylor expanded in z around 0 56.6%
Final simplification50.4%
(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.9%
Taylor expanded in z around 0 43.1%
Final simplification43.1%
(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 2024151
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
(/ x (* (- y z) (- t z))))