
(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{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 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(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{x \cdot \left(y - z\right)}{t - z}
\end{array}
(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(x / Float64(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[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
Initial program 85.1%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.8%
Applied egg-rr98.8%
(FPCore (x y z t) :precision binary64 (if (<= z -5.8e+124) (/ x (- 1.0 (/ t z))) (if (<= z 4.3e+132) (* (- y z) (/ x (- t z))) (* x (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+124) {
tmp = x / (1.0 - (t / z));
} else if (z <= 4.3e+132) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = x * (1.0 - (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 <= (-5.8d+124)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 4.3d+132) then
tmp = (y - z) * (x / (t - z))
else
tmp = x * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+124) {
tmp = x / (1.0 - (t / z));
} else if (z <= 4.3e+132) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.8e+124: tmp = x / (1.0 - (t / z)) elif z <= 4.3e+132: tmp = (y - z) * (x / (t - z)) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.8e+124) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 4.3e+132) tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z))); else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.8e+124) tmp = x / (1.0 - (t / z)); elseif (z <= 4.3e+132) tmp = (y - z) * (x / (t - z)); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.8e+124], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+132], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+124}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+132}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -5.80000000000000043e124Initial program 65.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6491.1%
Simplified91.1%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f6491.3%
Simplified91.3%
if -5.80000000000000043e124 < z < 4.29999999999999982e132Initial program 91.5%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.9%
Applied egg-rr91.9%
if 4.29999999999999982e132 < z Initial program 68.2%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6485.6%
Simplified85.6%
Final simplification91.0%
(FPCore (x y z t) :precision binary64 (if (<= t -1.45e+61) (* x (- (/ y t) (/ z t))) (if (<= t 5.5e-32) (* x (- 1.0 (/ y z))) (/ x (/ t (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.45e+61) {
tmp = x * ((y / t) - (z / t));
} else if (t <= 5.5e-32) {
tmp = x * (1.0 - (y / 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 <= (-1.45d+61)) then
tmp = x * ((y / t) - (z / t))
else if (t <= 5.5d-32) then
tmp = x * (1.0d0 - (y / 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 <= -1.45e+61) {
tmp = x * ((y / t) - (z / t));
} else if (t <= 5.5e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.45e+61: tmp = x * ((y / t) - (z / t)) elif t <= 5.5e-32: tmp = x * (1.0 - (y / z)) else: tmp = x / (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.45e+61) tmp = Float64(x * Float64(Float64(y / t) - Float64(z / t))); elseif (t <= 5.5e-32) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.45e+61) tmp = x * ((y / t) - (z / t)); elseif (t <= 5.5e-32) tmp = x * (1.0 - (y / z)); else tmp = x / (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.45e+61], N[(x * N[(N[(y / t), $MachinePrecision] - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-32], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+61}:\\
\;\;\;\;x \cdot \left(\frac{y}{t} - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\end{array}
\end{array}
if t < -1.45e61Initial program 81.4%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.1%
Simplified88.1%
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.1%
Applied egg-rr88.1%
if -1.45e61 < t < 5.50000000000000024e-32Initial program 84.9%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6478.7%
Simplified78.7%
if 5.50000000000000024e-32 < t Initial program 89.0%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.2%
Simplified83.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.3%
Applied egg-rr83.3%
(FPCore (x y z t) :precision binary64 (if (<= t -3.7e+59) (* x (/ (- y z) t)) (if (<= t 5e-32) (* x (- 1.0 (/ y z))) (/ x (/ t (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e+59) {
tmp = x * ((y - z) / t);
} else if (t <= 5e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.7d+59)) then
tmp = x * ((y - z) / t)
else if (t <= 5d-32) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e+59) {
tmp = x * ((y - z) / t);
} else if (t <= 5e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.7e+59: tmp = x * ((y - z) / t) elif t <= 5e-32: tmp = x * (1.0 - (y / z)) else: tmp = x / (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.7e+59) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (t <= 5e-32) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3.7e+59) tmp = x * ((y - z) / t); elseif (t <= 5e-32) tmp = x * (1.0 - (y / z)); else tmp = x / (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.7e+59], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-32], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\end{array}
\end{array}
if t < -3.69999999999999997e59Initial program 81.4%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.1%
Simplified88.1%
if -3.69999999999999997e59 < t < 5e-32Initial program 84.9%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6478.7%
Simplified78.7%
if 5e-32 < t Initial program 89.0%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.2%
Simplified83.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.3%
Applied egg-rr83.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (- y z) t)))) (if (<= t -6e+59) t_1 (if (<= t 7.8e-32) (* x (- 1.0 (/ y z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -6e+59) {
tmp = t_1;
} else if (t <= 7.8e-32) {
tmp = x * (1.0 - (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)
if (t <= (-6d+59)) then
tmp = t_1
else if (t <= 7.8d-32) then
tmp = x * (1.0d0 - (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);
double tmp;
if (t <= -6e+59) {
tmp = t_1;
} else if (t <= 7.8e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) tmp = 0 if t <= -6e+59: tmp = t_1 elif t <= 7.8e-32: tmp = x * (1.0 - (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -6e+59) tmp = t_1; elseif (t <= 7.8e-32) tmp = Float64(x * Float64(1.0 - 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); tmp = 0.0; if (t <= -6e+59) tmp = t_1; elseif (t <= 7.8e-32) tmp = x * (1.0 - (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] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+59], t$95$1, If[LessEqual[t, 7.8e-32], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -6 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.0000000000000001e59 or 7.8000000000000003e-32 < t Initial program 85.3%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.6%
Simplified85.6%
if -6.0000000000000001e59 < t < 7.8000000000000003e-32Initial program 84.9%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6478.7%
Simplified78.7%
(FPCore (x y z t) :precision binary64 (if (<= t -1.6e+61) (* x (/ y t)) (if (<= t 4.4e-32) (* x (- 1.0 (/ y z))) (/ x (/ t y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e+61) {
tmp = x * (y / t);
} else if (t <= 4.4e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.6d+61)) then
tmp = x * (y / t)
else if (t <= 4.4d-32) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e+61) {
tmp = x * (y / t);
} else if (t <= 4.4e-32) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.6e+61: tmp = x * (y / t) elif t <= 4.4e-32: tmp = x * (1.0 - (y / z)) else: tmp = x / (t / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.6e+61) tmp = Float64(x * Float64(y / t)); elseif (t <= 4.4e-32) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.6e+61) tmp = x * (y / t); elseif (t <= 4.4e-32) tmp = x * (1.0 - (y / z)); else tmp = x / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e+61], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-32], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+61}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -1.5999999999999999e61Initial program 81.4%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.1%
Simplified88.1%
Taylor expanded in y around inf
Simplified62.1%
if -1.5999999999999999e61 < t < 4.4e-32Initial program 84.9%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6478.7%
Simplified78.7%
if 4.4e-32 < t Initial program 89.0%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in z around 0
/-lowering-/.f6465.3%
Simplified65.3%
(FPCore (x y z t) :precision binary64 (if (<= z -7.8e+18) x (if (<= z 1.1e+80) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.8e+18) {
tmp = x;
} else if (z <= 1.1e+80) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-7.8d+18)) then
tmp = x
else if (z <= 1.1d+80) then
tmp = x / (t / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.8e+18) {
tmp = x;
} else if (z <= 1.1e+80) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.8e+18: tmp = x elif z <= 1.1e+80: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.8e+18) tmp = x; elseif (z <= 1.1e+80) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.8e+18) tmp = x; elseif (z <= 1.1e+80) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.8e+18], x, If[LessEqual[z, 1.1e+80], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+80}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.8e18 or 1.10000000000000001e80 < z Initial program 75.1%
Taylor expanded in z around inf
Simplified65.0%
if -7.8e18 < z < 1.10000000000000001e80Initial program 92.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.0%
Applied egg-rr98.0%
Taylor expanded in z around 0
/-lowering-/.f6462.0%
Simplified62.0%
(FPCore (x y z t) :precision binary64 (if (<= z -9.2e+18) x (if (<= z 8.6e+80) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.2e+18) {
tmp = x;
} else if (z <= 8.6e+80) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-9.2d+18)) then
tmp = x
else if (z <= 8.6d+80) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.2e+18) {
tmp = x;
} else if (z <= 8.6e+80) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9.2e+18: tmp = x elif z <= 8.6e+80: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9.2e+18) tmp = x; elseif (z <= 8.6e+80) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -9.2e+18) tmp = x; elseif (z <= 8.6e+80) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9.2e+18], x, If[LessEqual[z, 8.6e+80], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.2e18 or 8.60000000000000008e80 < z Initial program 75.1%
Taylor expanded in z around inf
Simplified65.0%
if -9.2e18 < z < 8.60000000000000008e80Initial program 92.3%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.1%
Simplified75.1%
Taylor expanded in y around inf
Simplified62.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 85.1%
Taylor expanded in z around inf
Simplified34.4%
(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(x / Float64(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[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024152
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (/ x (/ (- t z) (- y z))))
(/ (* x (- y z)) (- t z)))