
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
(FPCore (x y z t) :precision binary64 (/ (/ x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
def code(x, y, z, t): return (x / (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x / (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 88.2%
Taylor expanded in x around 0 88.2%
associate-/l/98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x y) (- t z))
(if (<= t_1 5e+302) (/ x t_1) (/ (/ x z) (- z t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / y) / (t - z);
} else if (t_1 <= 5e+302) {
tmp = x / t_1;
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / y) / (t - z);
} else if (t_1 <= 5e+302) {
tmp = x / t_1;
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / y) / (t - z) elif t_1 <= 5e+302: tmp = x / t_1 else: tmp = (x / z) / (z - t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t_1 <= 5e+302) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if (t_1 <= -Inf) tmp = (x / y) / (t - z); elseif (t_1 <= 5e+302) tmp = x / t_1; else tmp = (x / z) / (z - t); 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[LessEqual[t$95$1, (-Infinity)], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(x / t$95$1), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 62.3%
Taylor expanded in x around 0 62.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around inf 81.6%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5e302Initial program 98.5%
if 5e302 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 70.4%
Taylor expanded in x around 0 70.4%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
associate-*r/87.3%
mul-1-neg87.3%
Simplified87.3%
Final simplification94.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- t)))))
(if (<= z -2.25e-115)
t_1
(if (<= z 1.1e-23)
(/ (/ x t) y)
(if (<= z 2.45e+125) t_1 (/ x (* y z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * -t);
double tmp;
if (z <= -2.25e-115) {
tmp = t_1;
} else if (z <= 1.1e-23) {
tmp = (x / t) / y;
} else if (z <= 2.45e+125) {
tmp = t_1;
} else {
tmp = x / (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (z * -t)
if (z <= (-2.25d-115)) then
tmp = t_1
else if (z <= 1.1d-23) then
tmp = (x / t) / y
else if (z <= 2.45d+125) then
tmp = t_1
else
tmp = x / (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 * -t);
double tmp;
if (z <= -2.25e-115) {
tmp = t_1;
} else if (z <= 1.1e-23) {
tmp = (x / t) / y;
} else if (z <= 2.45e+125) {
tmp = t_1;
} else {
tmp = x / (y * z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * -t) tmp = 0 if z <= -2.25e-115: tmp = t_1 elif z <= 1.1e-23: tmp = (x / t) / y elif z <= 2.45e+125: tmp = t_1 else: tmp = x / (y * z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(-t))) tmp = 0.0 if (z <= -2.25e-115) tmp = t_1; elseif (z <= 1.1e-23) tmp = Float64(Float64(x / t) / y); elseif (z <= 2.45e+125) tmp = t_1; else tmp = Float64(x / Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * -t); tmp = 0.0; if (z <= -2.25e-115) tmp = t_1; elseif (z <= 1.1e-23) tmp = (x / t) / y; elseif (z <= 2.45e+125) tmp = t_1; else tmp = x / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-115], t$95$1, If[LessEqual[z, 1.1e-23], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.45e+125], t$95$1, N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(-t\right)}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -2.25000000000000011e-115 or 1.1e-23 < z < 2.45000000000000008e125Initial program 88.8%
associate-/l/99.0%
Simplified99.0%
Taylor expanded in t around inf 51.1%
Taylor expanded in y around 0 40.2%
associate-*r/40.2%
mul-1-neg40.2%
Simplified40.2%
if -2.25000000000000011e-115 < z < 1.1e-23Initial program 93.5%
Taylor expanded in x around 0 93.5%
associate-/l/95.9%
Simplified95.9%
clear-num95.6%
associate-/r/95.8%
associate-*l/93.5%
Applied egg-rr93.5%
associate-*l/95.8%
clear-num95.8%
associate-*l/95.8%
*-un-lft-identity95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 72.0%
associate-/r*73.5%
Simplified73.5%
if 2.45000000000000008e125 < z Initial program 72.3%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 91.8%
associate-*r/91.8%
neg-mul-191.8%
Simplified91.8%
div-inv91.8%
associate-/l*67.3%
add-sqr-sqrt23.5%
sqrt-unprod62.0%
sqr-neg62.0%
sqrt-unprod41.1%
add-sqr-sqrt64.7%
Applied egg-rr64.7%
associate-/r*64.9%
associate-*r/64.9%
times-frac64.2%
associate-*r/64.2%
associate-*l/64.2%
*-rgt-identity64.2%
associate-/r*64.9%
Simplified64.9%
Taylor expanded in z around 0 34.8%
*-commutative34.8%
Simplified34.8%
Final simplification51.4%
(FPCore (x y z t)
:precision binary64
(if (<= t -4.2e-41)
(/ (/ x t) y)
(if (<= t 1.02e-18)
(/ (/ x y) (- z))
(if (<= t 3e+130) (/ x (* y t)) (/ (/ x t) (- z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.2e-41) {
tmp = (x / t) / y;
} else if (t <= 1.02e-18) {
tmp = (x / y) / -z;
} else if (t <= 3e+130) {
tmp = x / (y * t);
} else {
tmp = (x / t) / -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.2d-41)) then
tmp = (x / t) / y
else if (t <= 1.02d-18) then
tmp = (x / y) / -z
else if (t <= 3d+130) then
tmp = x / (y * t)
else
tmp = (x / t) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.2e-41) {
tmp = (x / t) / y;
} else if (t <= 1.02e-18) {
tmp = (x / y) / -z;
} else if (t <= 3e+130) {
tmp = x / (y * t);
} else {
tmp = (x / t) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.2e-41: tmp = (x / t) / y elif t <= 1.02e-18: tmp = (x / y) / -z elif t <= 3e+130: tmp = x / (y * t) else: tmp = (x / t) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.2e-41) tmp = Float64(Float64(x / t) / y); elseif (t <= 1.02e-18) tmp = Float64(Float64(x / y) / Float64(-z)); elseif (t <= 3e+130) tmp = Float64(x / Float64(y * t)); else tmp = Float64(Float64(x / t) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4.2e-41) tmp = (x / t) / y; elseif (t <= 1.02e-18) tmp = (x / y) / -z; elseif (t <= 3e+130) tmp = x / (y * t); else tmp = (x / t) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.2e-41], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.02e-18], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[t, 3e+130], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+130}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if t < -4.20000000000000025e-41Initial program 90.2%
Taylor expanded in x around 0 90.2%
associate-/l/96.7%
Simplified96.7%
clear-num96.6%
associate-/r/96.6%
associate-*l/91.1%
Applied egg-rr91.1%
associate-*l/96.6%
clear-num95.6%
associate-*l/95.6%
*-un-lft-identity95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 49.8%
associate-/r*56.5%
Simplified56.5%
if -4.20000000000000025e-41 < t < 1.02e-18Initial program 88.3%
Taylor expanded in y around inf 50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in t around 0 36.3%
mul-1-neg36.3%
associate-/r*38.8%
distribute-neg-frac238.8%
Simplified38.8%
if 1.02e-18 < t < 2.9999999999999999e130Initial program 96.4%
Taylor expanded in z around 0 65.4%
if 2.9999999999999999e130 < t Initial program 73.9%
associate-/l/96.7%
Simplified96.7%
Taylor expanded in t around inf 91.8%
Taylor expanded in y around 0 49.9%
associate-*r/49.9%
mul-1-neg49.9%
Simplified49.9%
neg-mul-149.9%
*-commutative49.9%
times-frac67.3%
Applied egg-rr67.3%
associate-*l/67.3%
associate-*r/67.3%
neg-mul-167.3%
Applied egg-rr67.3%
Final simplification51.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.9e+121) (not (<= z 1.4e+122))) (/ x (* z (- y z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.9e+121) || !(z <= 1.4e+122)) {
tmp = x / (z * (y - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2.9d+121)) .or. (.not. (z <= 1.4d+122))) then
tmp = x / (z * (y - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.9e+121) || !(z <= 1.4e+122)) {
tmp = x / (z * (y - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.9e+121) or not (z <= 1.4e+122): tmp = x / (z * (y - z)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.9e+121) || !(z <= 1.4e+122)) tmp = Float64(x / Float64(z * Float64(y - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.9e+121) || ~((z <= 1.4e+122))) tmp = x / (z * (y - z)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.9e+121], N[Not[LessEqual[z, 1.4e+122]], $MachinePrecision]], N[(x / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+121} \lor \neg \left(z \leq 1.4 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -2.8999999999999999e121 or 1.4e122 < z Initial program 71.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 88.7%
associate-*r/88.7%
neg-mul-188.7%
Simplified88.7%
div-inv88.6%
associate-/l*69.9%
add-sqr-sqrt26.7%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod40.7%
add-sqr-sqrt65.0%
Applied egg-rr65.0%
associate-/r*65.1%
associate-*r/65.1%
times-frac64.6%
associate-*r/64.6%
associate-*l/64.6%
*-rgt-identity64.6%
associate-/r*65.1%
Simplified65.1%
if -2.8999999999999999e121 < z < 1.4e122Initial program 95.1%
Taylor expanded in t around inf 65.3%
Final simplification65.3%
(FPCore (x y z t) :precision binary64 (if (<= z -5e-115) (/ (/ x (- z)) t) (if (<= z 4.2e-24) (* (/ x y) (/ 1.0 t)) (/ (/ x y) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-115) {
tmp = (x / -z) / t;
} else if (z <= 4.2e-24) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / y) / -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-5d-115)) then
tmp = (x / -z) / t
else if (z <= 4.2d-24) then
tmp = (x / y) * (1.0d0 / t)
else
tmp = (x / y) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-115) {
tmp = (x / -z) / t;
} else if (z <= 4.2e-24) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / y) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e-115: tmp = (x / -z) / t elif z <= 4.2e-24: tmp = (x / y) * (1.0 / t) else: tmp = (x / y) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e-115) tmp = Float64(Float64(x / Float64(-z)) / t); elseif (z <= 4.2e-24) tmp = Float64(Float64(x / y) * Float64(1.0 / t)); else tmp = Float64(Float64(x / y) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5e-115) tmp = (x / -z) / t; elseif (z <= 4.2e-24) tmp = (x / y) * (1.0 / t); else tmp = (x / y) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e-115], N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.2e-24], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\end{array}
\end{array}
if z < -5.0000000000000003e-115Initial program 85.6%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 51.0%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
Taylor expanded in x around 0 39.4%
associate-/l/45.8%
associate-*r/45.8%
associate-*r/45.8%
mul-1-neg45.8%
Simplified45.8%
if -5.0000000000000003e-115 < z < 4.1999999999999999e-24Initial program 93.5%
Taylor expanded in z around 0 71.6%
*-un-lft-identity71.6%
times-frac73.8%
Applied egg-rr73.8%
if 4.1999999999999999e-24 < z Initial program 85.0%
Taylor expanded in y around inf 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around 0 31.6%
mul-1-neg31.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification52.3%
(FPCore (x y z t) :precision binary64 (if (<= z -1.1e-115) (/ -1.0 (* t (/ z x))) (if (<= z 4.2e-24) (* (/ x y) (/ 1.0 t)) (/ (/ x y) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e-115) {
tmp = -1.0 / (t * (z / x));
} else if (z <= 4.2e-24) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / y) / -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.1d-115)) then
tmp = (-1.0d0) / (t * (z / x))
else if (z <= 4.2d-24) then
tmp = (x / y) * (1.0d0 / t)
else
tmp = (x / y) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e-115) {
tmp = -1.0 / (t * (z / x));
} else if (z <= 4.2e-24) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / y) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.1e-115: tmp = -1.0 / (t * (z / x)) elif z <= 4.2e-24: tmp = (x / y) * (1.0 / t) else: tmp = (x / y) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.1e-115) tmp = Float64(-1.0 / Float64(t * Float64(z / x))); elseif (z <= 4.2e-24) tmp = Float64(Float64(x / y) * Float64(1.0 / t)); else tmp = Float64(Float64(x / y) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.1e-115) tmp = -1.0 / (t * (z / x)); elseif (z <= 4.2e-24) tmp = (x / y) * (1.0 / t); else tmp = (x / y) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.1e-115], N[(-1.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-24], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{-1}{t \cdot \frac{z}{x}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\end{array}
\end{array}
if z < -1.1e-115Initial program 85.6%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 51.0%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
neg-mul-139.4%
*-commutative39.4%
times-frac43.7%
Applied egg-rr43.7%
clear-num43.7%
frac-times42.9%
metadata-eval42.9%
associate-/l*38.6%
*-commutative38.6%
associate-/l*44.9%
Applied egg-rr44.9%
if -1.1e-115 < z < 4.1999999999999999e-24Initial program 93.5%
Taylor expanded in z around 0 71.6%
*-un-lft-identity71.6%
times-frac73.8%
Applied egg-rr73.8%
if 4.1999999999999999e-24 < z Initial program 85.0%
Taylor expanded in y around inf 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around 0 31.6%
mul-1-neg31.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification52.0%
(FPCore (x y z t) :precision binary64 (if (<= t -6e-140) (* (/ x y) (/ 1.0 t)) (if (<= t 3.7e-137) (/ (/ x y) (- z)) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6e-140) {
tmp = (x / y) * (1.0 / t);
} else if (t <= 3.7e-137) {
tmp = (x / y) / -z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6d-140)) then
tmp = (x / y) * (1.0d0 / t)
else if (t <= 3.7d-137) then
tmp = (x / y) / -z
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6e-140) {
tmp = (x / y) * (1.0 / t);
} else if (t <= 3.7e-137) {
tmp = (x / y) / -z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -6e-140: tmp = (x / y) * (1.0 / t) elif t <= 3.7e-137: tmp = (x / y) / -z else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -6e-140) tmp = Float64(Float64(x / y) * Float64(1.0 / t)); elseif (t <= 3.7e-137) tmp = Float64(Float64(x / y) / Float64(-z)); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -6e-140) tmp = (x / y) * (1.0 / t); elseif (t <= 3.7e-137) tmp = (x / y) / -z; else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -6e-140], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e-137], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-140}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -6.00000000000000037e-140Initial program 89.7%
Taylor expanded in z around 0 45.7%
*-un-lft-identity45.7%
times-frac45.8%
Applied egg-rr45.8%
if -6.00000000000000037e-140 < t < 3.7e-137Initial program 90.9%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in t around 0 41.7%
mul-1-neg41.7%
associate-/r*42.7%
distribute-neg-frac242.7%
Simplified42.7%
if 3.7e-137 < t Initial program 84.1%
Taylor expanded in t around inf 64.4%
Final simplification51.0%
(FPCore (x y z t) :precision binary64 (if (<= y -2.4e-88) (/ (/ x y) (- t z)) (if (<= y 1e-60) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-88) {
tmp = (x / y) / (t - z);
} else if (y <= 1e-60) {
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.4d-88)) then
tmp = (x / y) / (t - z)
else if (y <= 1d-60) 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.4e-88) {
tmp = (x / y) / (t - z);
} else if (y <= 1e-60) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-88: tmp = (x / y) / (t - z) elif y <= 1e-60: 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.4e-88) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 1e-60) tmp = Float64(x / Float64(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.4e-88) tmp = (x / y) / (t - z); elseif (y <= 1e-60) 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.4e-88], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-60], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-88}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 10^{-60}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.4e-88Initial program 87.0%
Taylor expanded in x around 0 87.0%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in y around inf 78.9%
if -2.4e-88 < y < 9.9999999999999997e-61Initial program 91.2%
Taylor expanded in y around 0 77.2%
associate-*r/77.2%
neg-mul-177.2%
Simplified77.2%
if 9.9999999999999997e-61 < y Initial program 85.6%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in t around inf 58.8%
Final simplification71.8%
(FPCore (x y z t) :precision binary64 (if (<= y -2.5e-88) (/ (/ x y) (- t z)) (if (<= y 24000000000000.0) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-88) {
tmp = (x / y) / (t - z);
} else if (y <= 24000000000000.0) {
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.5d-88)) then
tmp = (x / y) / (t - z)
else if (y <= 24000000000000.0d0) 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.5e-88) {
tmp = (x / y) / (t - z);
} else if (y <= 24000000000000.0) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5e-88: tmp = (x / y) / (t - z) elif y <= 24000000000000.0: 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.5e-88) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 24000000000000.0) 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.5e-88) tmp = (x / y) / (t - z); elseif (y <= 24000000000000.0) 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.5e-88], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 24000000000000.0], 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.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 24000000000000:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.50000000000000004e-88Initial program 87.0%
Taylor expanded in x around 0 87.0%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in y around inf 78.9%
if -2.50000000000000004e-88 < y < 2.4e13Initial program 89.5%
Taylor expanded in x around 0 89.5%
associate-/l/98.9%
Simplified98.9%
Taylor expanded in y around 0 83.0%
associate-*r/83.0%
mul-1-neg83.0%
Simplified83.0%
if 2.4e13 < y Initial program 87.2%
associate-/l/96.8%
Simplified96.8%
Taylor expanded in t around inf 59.9%
Final simplification76.2%
(FPCore (x y z t) :precision binary64 (if (<= t -1.6e-115) (/ (/ x y) (- t z)) (if (<= t 6.2e+32) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e-115) {
tmp = (x / y) / (t - z);
} else if (t <= 6.2e+32) {
tmp = (x / z) / (z - y);
} 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 <= (-1.6d-115)) then
tmp = (x / y) / (t - z)
else if (t <= 6.2d+32) then
tmp = (x / z) / (z - y)
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 <= -1.6e-115) {
tmp = (x / y) / (t - z);
} else if (t <= 6.2e+32) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.6e-115: tmp = (x / y) / (t - z) elif t <= 6.2e+32: tmp = (x / z) / (z - y) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.6e-115) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 6.2e+32) tmp = Float64(Float64(x / z) / Float64(z - y)); 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 <= -1.6e-115) tmp = (x / y) / (t - z); elseif (t <= 6.2e+32) tmp = (x / z) / (z - y); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e-115], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+32], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.6e-115Initial program 89.5%
Taylor expanded in x around 0 89.5%
associate-/l/97.1%
Simplified97.1%
Taylor expanded in y around inf 55.7%
if -1.6e-115 < t < 6.19999999999999986e32Initial program 89.8%
associate-/l/97.1%
Simplified97.1%
Taylor expanded in t around 0 81.2%
associate-*r/81.2%
neg-mul-181.2%
Simplified81.2%
if 6.19999999999999986e32 < t Initial program 81.4%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in t around inf 90.9%
Final simplification72.9%
(FPCore (x y z t) :precision binary64 (if (<= z -5e-115) (/ x (* z (- t))) (if (<= z 4.6e-24) (/ (/ x t) y) (/ x (* y (- z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-115) {
tmp = x / (z * -t);
} else if (z <= 4.6e-24) {
tmp = (x / t) / y;
} else {
tmp = x / (y * -z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-5d-115)) then
tmp = x / (z * -t)
else if (z <= 4.6d-24) then
tmp = (x / t) / y
else
tmp = x / (y * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-115) {
tmp = x / (z * -t);
} else if (z <= 4.6e-24) {
tmp = (x / t) / y;
} else {
tmp = x / (y * -z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e-115: tmp = x / (z * -t) elif z <= 4.6e-24: tmp = (x / t) / y else: tmp = x / (y * -z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e-115) tmp = Float64(x / Float64(z * Float64(-t))); elseif (z <= 4.6e-24) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / Float64(y * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5e-115) tmp = x / (z * -t); elseif (z <= 4.6e-24) tmp = (x / t) / y; else tmp = x / (y * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e-115], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e-24], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-115}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\end{array}
\end{array}
if z < -5.0000000000000003e-115Initial program 85.6%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 51.0%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
if -5.0000000000000003e-115 < z < 4.6000000000000002e-24Initial program 93.5%
Taylor expanded in x around 0 93.5%
associate-/l/95.8%
Simplified95.8%
clear-num95.6%
associate-/r/95.7%
associate-*l/93.4%
Applied egg-rr93.4%
associate-*l/95.7%
clear-num95.7%
associate-*l/95.8%
*-un-lft-identity95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 71.6%
associate-/r*73.2%
Simplified73.2%
if 4.6000000000000002e-24 < z Initial program 85.0%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 78.8%
associate-*r/78.8%
neg-mul-178.8%
Simplified78.8%
Taylor expanded in z around 0 31.6%
associate-*r/31.6%
mul-1-neg31.6%
*-commutative31.6%
Simplified31.6%
Final simplification49.2%
(FPCore (x y z t) :precision binary64 (if (<= z -7.5e-118) (/ x (* z (- t))) (if (<= z 5.5e-24) (/ (/ x t) y) (/ (/ x y) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e-118) {
tmp = x / (z * -t);
} else if (z <= 5.5e-24) {
tmp = (x / t) / y;
} else {
tmp = (x / y) / -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-7.5d-118)) then
tmp = x / (z * -t)
else if (z <= 5.5d-24) then
tmp = (x / t) / y
else
tmp = (x / y) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e-118) {
tmp = x / (z * -t);
} else if (z <= 5.5e-24) {
tmp = (x / t) / y;
} else {
tmp = (x / y) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.5e-118: tmp = x / (z * -t) elif z <= 5.5e-24: tmp = (x / t) / y else: tmp = (x / y) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.5e-118) tmp = Float64(x / Float64(z * Float64(-t))); elseif (z <= 5.5e-24) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / y) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.5e-118) tmp = x / (z * -t); elseif (z <= 5.5e-24) tmp = (x / t) / y; else tmp = (x / y) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.5e-118], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-24], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\end{array}
\end{array}
if z < -7.49999999999999978e-118Initial program 85.6%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 51.0%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
if -7.49999999999999978e-118 < z < 5.4999999999999999e-24Initial program 93.5%
Taylor expanded in x around 0 93.5%
associate-/l/95.8%
Simplified95.8%
clear-num95.6%
associate-/r/95.7%
associate-*l/93.4%
Applied egg-rr93.4%
associate-*l/95.7%
clear-num95.7%
associate-*l/95.8%
*-un-lft-identity95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 71.6%
associate-/r*73.2%
Simplified73.2%
if 5.4999999999999999e-24 < z Initial program 85.0%
Taylor expanded in y around inf 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around 0 31.6%
mul-1-neg31.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification49.8%
(FPCore (x y z t) :precision binary64 (if (<= z -4.4e-115) (/ (/ x (- z)) t) (if (<= z 3.8e-24) (/ (/ x t) y) (/ (/ x y) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.4e-115) {
tmp = (x / -z) / t;
} else if (z <= 3.8e-24) {
tmp = (x / t) / y;
} else {
tmp = (x / y) / -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.4d-115)) then
tmp = (x / -z) / t
else if (z <= 3.8d-24) then
tmp = (x / t) / y
else
tmp = (x / y) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.4e-115) {
tmp = (x / -z) / t;
} else if (z <= 3.8e-24) {
tmp = (x / t) / y;
} else {
tmp = (x / y) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.4e-115: tmp = (x / -z) / t elif z <= 3.8e-24: tmp = (x / t) / y else: tmp = (x / y) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.4e-115) tmp = Float64(Float64(x / Float64(-z)) / t); elseif (z <= 3.8e-24) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / y) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.4e-115) tmp = (x / -z) / t; elseif (z <= 3.8e-24) tmp = (x / t) / y; else tmp = (x / y) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.4e-115], N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.8e-24], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\
\end{array}
\end{array}
if z < -4.3999999999999999e-115Initial program 85.6%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 51.0%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
Taylor expanded in x around 0 39.4%
associate-/l/45.8%
associate-*r/45.8%
associate-*r/45.8%
mul-1-neg45.8%
Simplified45.8%
if -4.3999999999999999e-115 < z < 3.80000000000000026e-24Initial program 93.5%
Taylor expanded in x around 0 93.5%
associate-/l/95.8%
Simplified95.8%
clear-num95.6%
associate-/r/95.7%
associate-*l/93.4%
Applied egg-rr93.4%
associate-*l/95.7%
clear-num95.7%
associate-*l/95.8%
*-un-lft-identity95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 71.6%
associate-/r*73.2%
Simplified73.2%
if 3.80000000000000026e-24 < z Initial program 85.0%
Taylor expanded in y around inf 35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in t around 0 31.6%
mul-1-neg31.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.6e+121) (not (<= z 1.9e+75))) (/ x (* z t)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.6e+121) || !(z <= 1.9e+75)) {
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 <= (-3.6d+121)) .or. (.not. (z <= 1.9d+75))) 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 <= -3.6e+121) || !(z <= 1.9e+75)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.6e+121) or not (z <= 1.9e+75): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.6e+121) || !(z <= 1.9e+75)) 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 <= -3.6e+121) || ~((z <= 1.9e+75))) tmp = x / (z * t); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.6e+121], N[Not[LessEqual[z, 1.9e+75]], $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 -3.6 \cdot 10^{+121} \lor \neg \left(z \leq 1.9 \cdot 10^{+75}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.59999999999999981e121 or 1.9000000000000001e75 < z Initial program 75.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 47.3%
Taylor expanded in y around 0 43.0%
associate-*r/43.0%
mul-1-neg43.0%
Simplified43.0%
add-sqr-sqrt17.5%
sqrt-unprod43.6%
sqr-neg43.6%
sqrt-unprod24.4%
add-sqr-sqrt40.4%
*-un-lft-identity40.4%
*-commutative40.4%
associate-/r*42.6%
Applied egg-rr42.6%
*-lft-identity42.6%
associate-/l/40.4%
*-commutative40.4%
Simplified40.4%
if -3.59999999999999981e121 < z < 1.9000000000000001e75Initial program 94.7%
Taylor expanded in z around 0 51.1%
Final simplification47.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1.56e+122) (/ x (* z t)) (if (<= z 5.2e+29) (/ x (* y t)) (/ x (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.56e+122) {
tmp = x / (z * t);
} else if (z <= 5.2e+29) {
tmp = x / (y * t);
} else {
tmp = x / (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.56d+122)) then
tmp = x / (z * t)
else if (z <= 5.2d+29) then
tmp = x / (y * t)
else
tmp = x / (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.56e+122) {
tmp = x / (z * t);
} else if (z <= 5.2e+29) {
tmp = x / (y * t);
} else {
tmp = x / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.56e+122: tmp = x / (z * t) elif z <= 5.2e+29: tmp = x / (y * t) else: tmp = x / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.56e+122) tmp = Float64(x / Float64(z * t)); elseif (z <= 5.2e+29) tmp = Float64(x / Float64(y * t)); else tmp = Float64(x / Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.56e+122) tmp = x / (z * t); elseif (z <= 5.2e+29) tmp = x / (y * t); else tmp = x / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.56e+122], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+29], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+122}:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -1.55999999999999993e122Initial program 70.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 48.3%
Taylor expanded in y around 0 39.8%
associate-*r/39.8%
mul-1-neg39.8%
Simplified39.8%
add-sqr-sqrt14.7%
sqrt-unprod38.6%
sqr-neg38.6%
sqrt-unprod25.1%
add-sqr-sqrt40.0%
*-un-lft-identity40.0%
*-commutative40.0%
associate-/r*39.7%
Applied egg-rr39.7%
*-lft-identity39.7%
associate-/l/40.0%
*-commutative40.0%
Simplified40.0%
if -1.55999999999999993e122 < z < 5.2e29Initial program 95.0%
Taylor expanded in z around 0 52.9%
if 5.2e29 < z Initial program 81.2%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
div-inv86.4%
associate-/l*69.7%
add-sqr-sqrt28.4%
sqrt-unprod53.1%
sqr-neg53.1%
sqrt-unprod31.3%
add-sqr-sqrt51.6%
Applied egg-rr51.6%
associate-/r*51.7%
associate-*r/51.7%
times-frac51.3%
associate-*r/51.3%
associate-*l/51.3%
*-rgt-identity51.3%
associate-/r*51.7%
Simplified51.7%
Taylor expanded in z around 0 27.9%
*-commutative27.9%
Simplified27.9%
Final simplification45.3%
(FPCore (x y z t) :precision binary64 (if (<= z -3.5e+121) (/ x (* z t)) (if (<= z 6.5e+30) (/ (/ x t) y) (/ x (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+121) {
tmp = x / (z * t);
} else if (z <= 6.5e+30) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.5d+121)) then
tmp = x / (z * t)
else if (z <= 6.5d+30) then
tmp = (x / t) / y
else
tmp = x / (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+121) {
tmp = x / (z * t);
} else if (z <= 6.5e+30) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.5e+121: tmp = x / (z * t) elif z <= 6.5e+30: tmp = (x / t) / y else: tmp = x / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+121) tmp = Float64(x / Float64(z * t)); elseif (z <= 6.5e+30) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.5e+121) tmp = x / (z * t); elseif (z <= 6.5e+30) tmp = (x / t) / y; else tmp = x / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+121], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+30], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+30}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -3.5e121Initial program 70.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 48.3%
Taylor expanded in y around 0 39.8%
associate-*r/39.8%
mul-1-neg39.8%
Simplified39.8%
add-sqr-sqrt14.7%
sqrt-unprod38.6%
sqr-neg38.6%
sqrt-unprod25.1%
add-sqr-sqrt40.0%
*-un-lft-identity40.0%
*-commutative40.0%
associate-/r*39.7%
Applied egg-rr39.7%
*-lft-identity39.7%
associate-/l/40.0%
*-commutative40.0%
Simplified40.0%
if -3.5e121 < z < 6.5e30Initial program 95.0%
Taylor expanded in x around 0 95.0%
associate-/l/97.5%
Simplified97.5%
clear-num97.3%
associate-/r/97.4%
associate-*l/95.5%
Applied egg-rr95.5%
associate-*l/97.4%
clear-num96.9%
associate-*l/97.0%
*-un-lft-identity97.0%
Applied egg-rr97.0%
Taylor expanded in z around 0 52.9%
associate-/r*53.8%
Simplified53.8%
if 6.5e30 < z Initial program 81.2%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
div-inv86.4%
associate-/l*69.7%
add-sqr-sqrt28.4%
sqrt-unprod53.1%
sqr-neg53.1%
sqrt-unprod31.3%
add-sqr-sqrt51.6%
Applied egg-rr51.6%
associate-/r*51.7%
associate-*r/51.7%
times-frac51.3%
associate-*r/51.3%
associate-*l/51.3%
*-rgt-identity51.3%
associate-/r*51.7%
Simplified51.7%
Taylor expanded in z around 0 27.9%
*-commutative27.9%
Simplified27.9%
Final simplification45.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.3e-90) (/ x (* y (- t z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-90) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.3d-90)) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-90) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e-90: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e-90) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e-90) tmp = x / (y * (t - z)); else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e-90], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-90}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -1.3e-90Initial program 87.3%
Taylor expanded in y around inf 73.9%
*-commutative73.9%
Simplified73.9%
if -1.3e-90 < y Initial program 88.6%
Taylor expanded in t around inf 56.9%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (if (<= t 4.2e-29) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.2e-29) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 4.2d-29) then
tmp = x / (y * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.2e-29) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 4.2e-29: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 4.2e-29) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 4.2e-29) tmp = x / (y * (t - z)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 4.2e-29], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 4.19999999999999979e-29Initial program 89.0%
Taylor expanded in y around inf 53.8%
*-commutative53.8%
Simplified53.8%
if 4.19999999999999979e-29 < t Initial program 85.5%
associate-/l/96.9%
Simplified96.9%
Taylor expanded in t around inf 87.1%
Final simplification61.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.3e-90) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-90) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.3d-90)) then
tmp = (x / y) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-90) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e-90: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e-90) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e-90) tmp = (x / y) / (t - z); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e-90], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-90}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.3e-90Initial program 87.3%
Taylor expanded in x around 0 87.3%
associate-/l/96.4%
Simplified96.4%
Taylor expanded in y around inf 76.9%
if -1.3e-90 < y Initial program 88.6%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around inf 58.3%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (t - z)) / (y - z)
end function
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
def code(x, y, z, t): return (x / (t - z)) / (y - z)
function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
function tmp = code(x, y, z, t) tmp = (x / (t - z)) / (y - z); end
code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 88.2%
associate-/l/97.3%
Simplified97.3%
Final simplification97.3%
(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 88.2%
Taylor expanded in z around 0 38.8%
Final simplification38.8%
(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 2024055
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))