
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 89.4%
+-commutative89.4%
associate-/l*98.0%
fma-define98.1%
Simplified98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- t z))) (t_2 (* y (/ (- z t) z))))
(if (<= y -1.7e+278)
t_2
(if (<= y -1.12e+172)
t_1
(if (<= y -8.5e+128)
t_2
(if (<= y -1.55e+93)
t_1
(if (<= y 5.6e-107) (+ y x) (if (<= y 3e+71) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * (t - z);
double t_2 = y * ((z - t) / z);
double tmp;
if (y <= -1.7e+278) {
tmp = t_2;
} else if (y <= -1.12e+172) {
tmp = t_1;
} else if (y <= -8.5e+128) {
tmp = t_2;
} else if (y <= -1.55e+93) {
tmp = t_1;
} else if (y <= 5.6e-107) {
tmp = y + x;
} else if (y <= 3e+71) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y / a) * (t - z)
t_2 = y * ((z - t) / z)
if (y <= (-1.7d+278)) then
tmp = t_2
else if (y <= (-1.12d+172)) then
tmp = t_1
else if (y <= (-8.5d+128)) then
tmp = t_2
else if (y <= (-1.55d+93)) then
tmp = t_1
else if (y <= 5.6d-107) then
tmp = y + x
else if (y <= 3d+71) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * (t - z);
double t_2 = y * ((z - t) / z);
double tmp;
if (y <= -1.7e+278) {
tmp = t_2;
} else if (y <= -1.12e+172) {
tmp = t_1;
} else if (y <= -8.5e+128) {
tmp = t_2;
} else if (y <= -1.55e+93) {
tmp = t_1;
} else if (y <= 5.6e-107) {
tmp = y + x;
} else if (y <= 3e+71) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * (t - z) t_2 = y * ((z - t) / z) tmp = 0 if y <= -1.7e+278: tmp = t_2 elif y <= -1.12e+172: tmp = t_1 elif y <= -8.5e+128: tmp = t_2 elif y <= -1.55e+93: tmp = t_1 elif y <= 5.6e-107: tmp = y + x elif y <= 3e+71: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(t - z)) t_2 = Float64(y * Float64(Float64(z - t) / z)) tmp = 0.0 if (y <= -1.7e+278) tmp = t_2; elseif (y <= -1.12e+172) tmp = t_1; elseif (y <= -8.5e+128) tmp = t_2; elseif (y <= -1.55e+93) tmp = t_1; elseif (y <= 5.6e-107) tmp = Float64(y + x); elseif (y <= 3e+71) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * (t - z); t_2 = y * ((z - t) / z); tmp = 0.0; if (y <= -1.7e+278) tmp = t_2; elseif (y <= -1.12e+172) tmp = t_1; elseif (y <= -8.5e+128) tmp = t_2; elseif (y <= -1.55e+93) tmp = t_1; elseif (y <= 5.6e-107) tmp = y + x; elseif (y <= 3e+71) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+278], t$95$2, If[LessEqual[y, -1.12e+172], t$95$1, If[LessEqual[y, -8.5e+128], t$95$2, If[LessEqual[y, -1.55e+93], t$95$1, If[LessEqual[y, 5.6e-107], N[(y + x), $MachinePrecision], If[LessEqual[y, 3e+71], x, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
t_2 := y \cdot \frac{z - t}{z}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+128}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-107}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.7e278 or -1.12000000000000002e172 < y < -8.50000000000000045e128Initial program 67.0%
+-commutative67.0%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 83.1%
div-sub83.0%
associate-*r/50.2%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in z around inf 77.6%
Taylor expanded in y around 0 50.1%
associate-*r/82.9%
Simplified82.9%
if -1.7e278 < y < -1.12000000000000002e172 or -8.50000000000000045e128 < y < -1.5500000000000001e93 or 3.00000000000000013e71 < y Initial program 82.6%
+-commutative82.6%
associate-/l*98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in a around inf 69.7%
mul-1-neg69.7%
unsub-neg69.7%
associate-/l*72.2%
Simplified72.2%
clear-num72.1%
un-div-inv72.1%
Applied egg-rr72.1%
Taylor expanded in x around 0 58.1%
mul-1-neg58.1%
associate-*r/60.7%
distribute-rgt-neg-out60.7%
neg-sub060.7%
div-sub60.7%
associate--r-60.7%
neg-sub060.7%
+-commutative60.7%
sub-neg60.7%
distribute-lft-out--56.7%
associate-/l*53.8%
*-commutative53.8%
associate-/l*56.4%
associate-/l*56.6%
associate-*l/51.3%
*-commutative51.3%
distribute-rgt-out--60.6%
Simplified60.6%
if -1.5500000000000001e93 < y < 5.5999999999999998e-107Initial program 96.0%
+-commutative96.0%
associate-/l*98.3%
fma-define98.3%
Simplified98.3%
Taylor expanded in z around inf 76.6%
+-commutative76.6%
Simplified76.6%
if 5.5999999999999998e-107 < y < 3.00000000000000013e71Initial program 91.8%
+-commutative91.8%
associate-/l*95.3%
fma-define95.3%
Simplified95.3%
Taylor expanded in y around 0 54.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+115)
(+ y x)
(if (<= z -2e+17)
(+ x (* y (/ t a)))
(if (or (<= z -126000000.0) (not (<= z 13800000.0)))
(+ y x)
(+ x (/ (* y t) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+115) {
tmp = y + x;
} else if (z <= -2e+17) {
tmp = x + (y * (t / a));
} else if ((z <= -126000000.0) || !(z <= 13800000.0)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.65d+115)) then
tmp = y + x
else if (z <= (-2d+17)) then
tmp = x + (y * (t / a))
else if ((z <= (-126000000.0d0)) .or. (.not. (z <= 13800000.0d0))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+115) {
tmp = y + x;
} else if (z <= -2e+17) {
tmp = x + (y * (t / a));
} else if ((z <= -126000000.0) || !(z <= 13800000.0)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+115: tmp = y + x elif z <= -2e+17: tmp = x + (y * (t / a)) elif (z <= -126000000.0) or not (z <= 13800000.0): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+115) tmp = Float64(y + x); elseif (z <= -2e+17) tmp = Float64(x + Float64(y * Float64(t / a))); elseif ((z <= -126000000.0) || !(z <= 13800000.0)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+115) tmp = y + x; elseif (z <= -2e+17) tmp = x + (y * (t / a)); elseif ((z <= -126000000.0) || ~((z <= 13800000.0))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+115], N[(y + x), $MachinePrecision], If[LessEqual[z, -2e+17], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -126000000.0], N[Not[LessEqual[z, 13800000.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+115}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq -126000000 \lor \neg \left(z \leq 13800000\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.65000000000000003e115 or -2e17 < z < -1.26e8 or 1.38e7 < z Initial program 77.6%
+-commutative77.6%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 80.2%
+-commutative80.2%
Simplified80.2%
if -1.65000000000000003e115 < z < -2e17Initial program 84.3%
Taylor expanded in z around 0 54.5%
*-commutative54.5%
associate-/l*59.7%
Applied egg-rr59.7%
if -1.26e8 < z < 1.38e7Initial program 97.7%
Taylor expanded in z around 0 77.1%
Final simplification77.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) z))))
(if (<= y -5e+277)
t_1
(if (<= y -4.45e+241)
(/ (* y t) a)
(if (<= y -3.4e+78) t_1 (if (<= y 3e+73) x (* y (/ t a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / z);
double tmp;
if (y <= -5e+277) {
tmp = t_1;
} else if (y <= -4.45e+241) {
tmp = (y * t) / a;
} else if (y <= -3.4e+78) {
tmp = t_1;
} else if (y <= 3e+73) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / z)
if (y <= (-5d+277)) then
tmp = t_1
else if (y <= (-4.45d+241)) then
tmp = (y * t) / a
else if (y <= (-3.4d+78)) then
tmp = t_1
else if (y <= 3d+73) then
tmp = x
else
tmp = y * (t / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / z);
double tmp;
if (y <= -5e+277) {
tmp = t_1;
} else if (y <= -4.45e+241) {
tmp = (y * t) / a;
} else if (y <= -3.4e+78) {
tmp = t_1;
} else if (y <= 3e+73) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / z) tmp = 0 if y <= -5e+277: tmp = t_1 elif y <= -4.45e+241: tmp = (y * t) / a elif y <= -3.4e+78: tmp = t_1 elif y <= 3e+73: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / z)) tmp = 0.0 if (y <= -5e+277) tmp = t_1; elseif (y <= -4.45e+241) tmp = Float64(Float64(y * t) / a); elseif (y <= -3.4e+78) tmp = t_1; elseif (y <= 3e+73) tmp = x; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / z); tmp = 0.0; if (y <= -5e+277) tmp = t_1; elseif (y <= -4.45e+241) tmp = (y * t) / a; elseif (y <= -3.4e+78) tmp = t_1; elseif (y <= 3e+73) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+277], t$95$1, If[LessEqual[y, -4.45e+241], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -3.4e+78], t$95$1, If[LessEqual[y, 3e+73], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+277}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.45 \cdot 10^{+241}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -4.99999999999999982e277 or -4.4500000000000003e241 < y < -3.40000000000000007e78Initial program 78.1%
+-commutative78.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 77.7%
div-sub77.7%
associate-*r/57.9%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in z around inf 50.9%
Taylor expanded in y around 0 35.1%
associate-*r/54.8%
Simplified54.8%
if -4.99999999999999982e277 < y < -4.4500000000000003e241Initial program 87.6%
+-commutative87.6%
associate-/l*93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in a around inf 81.4%
mul-1-neg81.4%
unsub-neg81.4%
associate-/l*75.3%
Simplified75.3%
clear-num75.1%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in t around inf 76.0%
if -3.40000000000000007e78 < y < 3.00000000000000011e73Initial program 96.0%
+-commutative96.0%
associate-/l*97.5%
fma-define97.5%
Simplified97.5%
Taylor expanded in y around 0 69.8%
if 3.00000000000000011e73 < y Initial program 77.3%
+-commutative77.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-/l*72.0%
Simplified72.0%
clear-num72.0%
un-div-inv72.0%
Applied egg-rr72.0%
Taylor expanded in t around inf 40.0%
*-commutative40.0%
associate-/l*47.5%
Simplified47.5%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.2e-60) (not (<= z 1.35e-20))) (+ x (* y (- 1.0 (/ t z)))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.2e-60) || !(z <= 1.35e-20)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.2d-60)) .or. (.not. (z <= 1.35d-20))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.2e-60) || !(z <= 1.35e-20)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.2e-60) or not (z <= 1.35e-20): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.2e-60) || !(z <= 1.35e-20)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.2e-60) || ~((z <= 1.35e-20))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.2e-60], N[Not[LessEqual[z, 1.35e-20]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-60} \lor \neg \left(z \leq 1.35 \cdot 10^{-20}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -8.20000000000000025e-60 or 1.35e-20 < z Initial program 82.1%
Taylor expanded in a around 0 67.5%
associate-/l*83.9%
div-sub83.9%
*-inverses83.9%
Simplified83.9%
if -8.20000000000000025e-60 < z < 1.35e-20Initial program 97.3%
+-commutative97.3%
associate-/l*96.0%
fma-define96.1%
Simplified96.1%
Taylor expanded in z around 0 81.0%
+-commutative81.0%
associate-/l*81.8%
Simplified81.8%
clear-num81.8%
un-div-inv81.8%
Applied egg-rr81.8%
Final simplification82.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e-60) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 195000.0) (+ x (* y (/ (- t z) a))) (- x (* y (/ (- t z) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-60) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 195000.0) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.5d-60)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 195000.0d0) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - (y * ((t - z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-60) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 195000.0) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e-60: tmp = x + (y * (1.0 - (t / z))) elif z <= 195000.0: tmp = x + (y * ((t - z) / a)) else: tmp = x - (y * ((t - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e-60) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 195000.0) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e-60) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 195000.0) tmp = x + (y * ((t - z) / a)); else tmp = x - (y * ((t - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e-60], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 195000.0], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 195000:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\end{array}
\end{array}
if z < -9.49999999999999958e-60Initial program 84.9%
Taylor expanded in a around 0 69.1%
associate-/l*81.5%
div-sub81.5%
*-inverses81.5%
Simplified81.5%
if -9.49999999999999958e-60 < z < 195000Initial program 97.4%
+-commutative97.4%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in a around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
associate-/l*86.5%
Simplified86.5%
if 195000 < z Initial program 77.0%
clear-num76.9%
inv-pow76.9%
Applied egg-rr76.9%
unpow-176.9%
*-commutative76.9%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in a around 0 68.1%
associate-/l*91.1%
Simplified91.1%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.06e-60) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 2.5e-19) (+ x (/ t (/ a y))) (- x (* y (/ (- t z) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.06e-60) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 2.5e-19) {
tmp = x + (t / (a / y));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.06d-60)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 2.5d-19) then
tmp = x + (t / (a / y))
else
tmp = x - (y * ((t - z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.06e-60) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 2.5e-19) {
tmp = x + (t / (a / y));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.06e-60: tmp = x + (y * (1.0 - (t / z))) elif z <= 2.5e-19: tmp = x + (t / (a / y)) else: tmp = x - (y * ((t - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.06e-60) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 2.5e-19) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.06e-60) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 2.5e-19) tmp = x + (t / (a / y)); else tmp = x - (y * ((t - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.06e-60], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-19], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\end{array}
\end{array}
if z < -1.06e-60Initial program 84.9%
Taylor expanded in a around 0 69.1%
associate-/l*81.5%
div-sub81.5%
*-inverses81.5%
Simplified81.5%
if -1.06e-60 < z < 2.5000000000000002e-19Initial program 97.3%
+-commutative97.3%
associate-/l*96.0%
fma-define96.1%
Simplified96.1%
Taylor expanded in z around 0 81.0%
+-commutative81.0%
associate-/l*81.8%
Simplified81.8%
clear-num81.8%
un-div-inv81.8%
Applied egg-rr81.8%
if 2.5000000000000002e-19 < z Initial program 78.5%
clear-num78.5%
inv-pow78.5%
Applied egg-rr78.5%
unpow-178.5%
*-commutative78.5%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in a around 0 65.5%
associate-/l*86.9%
Simplified86.9%
Final simplification82.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.4e-73) (+ x (* y (/ t a))) (if (<= x 5.8e-162) (* (- z t) (/ y (- z a))) (+ x (/ t (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e-73) {
tmp = x + (y * (t / a));
} else if (x <= 5.8e-162) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.4d-73)) then
tmp = x + (y * (t / a))
else if (x <= 5.8d-162) then
tmp = (z - t) * (y / (z - a))
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e-73) {
tmp = x + (y * (t / a));
} else if (x <= 5.8e-162) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.4e-73: tmp = x + (y * (t / a)) elif x <= 5.8e-162: tmp = (z - t) * (y / (z - a)) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.4e-73) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (x <= 5.8e-162) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.4e-73) tmp = x + (y * (t / a)); elseif (x <= 5.8e-162) tmp = (z - t) * (y / (z - a)); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.4e-73], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-162], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-73}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-162}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if x < -4.4e-73Initial program 88.8%
Taylor expanded in z around 0 76.7%
*-commutative76.7%
associate-/l*79.6%
Applied egg-rr79.6%
if -4.4e-73 < x < 5.8000000000000002e-162Initial program 85.2%
+-commutative85.2%
associate-/l*97.8%
fma-define97.8%
Simplified97.8%
Taylor expanded in y around inf 78.3%
div-sub78.3%
associate-*r/65.7%
associate-*l/74.4%
Simplified74.4%
if 5.8000000000000002e-162 < x Initial program 94.0%
+-commutative94.0%
associate-/l*97.0%
fma-define97.0%
Simplified97.0%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
associate-/l*77.6%
Simplified77.6%
clear-num77.6%
un-div-inv77.6%
Applied egg-rr77.6%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.8e-179) (+ y x) (if (<= z 3.4e-248) (* y (/ t a)) (if (<= z 1.36e+16) x (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e-179) {
tmp = y + x;
} else if (z <= 3.4e-248) {
tmp = y * (t / a);
} else if (z <= 1.36e+16) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.8d-179)) then
tmp = y + x
else if (z <= 3.4d-248) then
tmp = y * (t / a)
else if (z <= 1.36d+16) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e-179) {
tmp = y + x;
} else if (z <= 3.4e-248) {
tmp = y * (t / a);
} else if (z <= 1.36e+16) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e-179: tmp = y + x elif z <= 3.4e-248: tmp = y * (t / a) elif z <= 1.36e+16: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e-179) tmp = Float64(y + x); elseif (z <= 3.4e-248) tmp = Float64(y * Float64(t / a)); elseif (z <= 1.36e+16) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e-179) tmp = y + x; elseif (z <= 3.4e-248) tmp = y * (t / a); elseif (z <= 1.36e+16) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e-179], N[(y + x), $MachinePrecision], If[LessEqual[z, 3.4e-248], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+16], x, N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-179}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-248}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -8.80000000000000018e-179 or 1.36e16 < z Initial program 84.0%
+-commutative84.0%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 63.3%
+-commutative63.3%
Simplified63.3%
if -8.80000000000000018e-179 < z < 3.3999999999999998e-248Initial program 93.7%
+-commutative93.7%
associate-/l*98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in a around inf 89.9%
mul-1-neg89.9%
unsub-neg89.9%
associate-/l*94.2%
Simplified94.2%
clear-num94.2%
un-div-inv94.2%
Applied egg-rr94.2%
Taylor expanded in t around inf 55.9%
*-commutative55.9%
associate-/l*58.1%
Simplified58.1%
if 3.3999999999999998e-248 < z < 1.36e16Initial program 99.9%
+-commutative99.9%
associate-/l*93.2%
fma-define93.2%
Simplified93.2%
Taylor expanded in y around 0 63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+115) (not (<= z 7900000000.0))) (+ y x) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 7900000000.0)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+115)) .or. (.not. (z <= 7900000000.0d0))) then
tmp = y + x
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 7900000000.0)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+115) or not (z <= 7900000000.0): tmp = y + x else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+115) || !(z <= 7900000000.0)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+115) || ~((z <= 7900000000.0))) tmp = y + x; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+115], N[Not[LessEqual[z, 7900000000.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+115} \lor \neg \left(z \leq 7900000000\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.45000000000000002e115 or 7.9e9 < z Initial program 76.1%
+-commutative76.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.8%
+-commutative78.8%
Simplified78.8%
if -1.45000000000000002e115 < z < 7.9e9Initial program 96.3%
+-commutative96.3%
associate-/l*97.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in z around 0 73.2%
+-commutative73.2%
associate-/l*74.4%
Simplified74.4%
clear-num74.3%
un-div-inv74.4%
Applied egg-rr74.4%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+115) (not (<= z 95000000000.0))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 95000000000.0)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+115)) .or. (.not. (z <= 95000000000.0d0))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 95000000000.0)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+115) or not (z <= 95000000000.0): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+115) || !(z <= 95000000000.0)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+115) || ~((z <= 95000000000.0))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+115], N[Not[LessEqual[z, 95000000000.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+115} \lor \neg \left(z \leq 95000000000\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.45000000000000002e115 or 9.5e10 < z Initial program 76.1%
+-commutative76.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.8%
+-commutative78.8%
Simplified78.8%
if -1.45000000000000002e115 < z < 9.5e10Initial program 96.3%
+-commutative96.3%
associate-/l*97.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in z around 0 73.2%
+-commutative73.2%
associate-/l*74.4%
Simplified74.4%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+115) (not (<= z 33500000000.0))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 33500000000.0)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+115)) .or. (.not. (z <= 33500000000.0d0))) then
tmp = y + x
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+115) || !(z <= 33500000000.0)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+115) or not (z <= 33500000000.0): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+115) || !(z <= 33500000000.0)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+115) || ~((z <= 33500000000.0))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+115], N[Not[LessEqual[z, 33500000000.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+115} \lor \neg \left(z \leq 33500000000\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.45000000000000002e115 or 3.35e10 < z Initial program 76.1%
+-commutative76.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 78.8%
+-commutative78.8%
Simplified78.8%
if -1.45000000000000002e115 < z < 3.35e10Initial program 96.3%
Taylor expanded in z around 0 73.2%
*-commutative73.2%
associate-/l*73.2%
Applied egg-rr73.2%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e-28) (not (<= z 3.6e+16))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e-28) || !(z <= 3.6e+16)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.35d-28)) .or. (.not. (z <= 3.6d+16))) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e-28) || !(z <= 3.6e+16)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e-28) or not (z <= 3.6e+16): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e-28) || !(z <= 3.6e+16)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e-28) || ~((z <= 3.6e+16))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e-28], N[Not[LessEqual[z, 3.6e+16]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-28} \lor \neg \left(z \leq 3.6 \cdot 10^{+16}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.3499999999999999e-28 or 3.6e16 < z Initial program 79.4%
+-commutative79.4%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -1.3499999999999999e-28 < z < 3.6e16Initial program 97.6%
+-commutative97.6%
associate-/l*96.5%
fma-define96.5%
Simplified96.5%
Taylor expanded in y around 0 50.0%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (+ x (/ -1.0 (/ (/ (- z a) (- t z)) y))))
double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((-1.0d0) / (((z - a) / (t - z)) / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / y));
}
def code(x, y, z, t, a): return x + (-1.0 / (((z - a) / (t - z)) / y))
function code(x, y, z, t, a) return Float64(x + Float64(-1.0 / Float64(Float64(Float64(z - a) / Float64(t - z)) / y))) end
function tmp = code(x, y, z, t, a) tmp = x + (-1.0 / (((z - a) / (t - z)) / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(-1.0 / N[(N[(N[(z - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-1}{\frac{\frac{z - a}{t - z}}{y}}
\end{array}
Initial program 89.4%
clear-num89.4%
inv-pow89.4%
Applied egg-rr89.4%
unpow-189.4%
*-commutative89.4%
associate-/r*98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{z - a}
\end{array}
Initial program 89.4%
*-commutative89.4%
associate-*r/96.6%
Applied egg-rr96.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.15e+225) y x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+225) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.15d+225)) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+225) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.15e+225: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.15e+225) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.15e+225) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.15e+225], y, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+225}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.15e225Initial program 79.6%
+-commutative79.6%
associate-/l*96.3%
fma-define96.3%
Simplified96.3%
Taylor expanded in y around inf 96.3%
div-sub96.3%
associate-*r/79.6%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in z around inf 49.7%
Taylor expanded in z around inf 30.1%
if -1.15e225 < y Initial program 90.6%
+-commutative90.6%
associate-/l*98.3%
fma-define98.3%
Simplified98.3%
Taylor expanded in y around 0 55.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 89.4%
+-commutative89.4%
associate-/l*98.0%
fma-define98.1%
Simplified98.1%
Taylor expanded in y around 0 49.9%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024103
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))