
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.45e+61)
(+ x (/ y (/ t (- z a))))
(if (<= t 6.6e+123)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(- x (* y (+ (/ z (- a t)) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+61) {
tmp = x + (y / (t / (z - a)));
} else if (t <= 6.6e+123) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x - (y * ((z / (a - t)) + (a / t)));
}
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 (t <= (-2.45d+61)) then
tmp = x + (y / (t / (z - a)))
else if (t <= 6.6d+123) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else
tmp = x - (y * ((z / (a - t)) + (a / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+61) {
tmp = x + (y / (t / (z - a)));
} else if (t <= 6.6e+123) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x - (y * ((z / (a - t)) + (a / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.45e+61: tmp = x + (y / (t / (z - a))) elif t <= 6.6e+123: tmp = x + (y + ((t - z) / ((a - t) / y))) else: tmp = x - (y * ((z / (a - t)) + (a / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.45e+61) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); elseif (t <= 6.6e+123) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); else tmp = Float64(x - Float64(y * Float64(Float64(z / Float64(a - t)) + Float64(a / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.45e+61) tmp = x + (y / (t / (z - a))); elseif (t <= 6.6e+123) tmp = x + (y + ((t - z) / ((a - t) / y))); else tmp = x - (y * ((z / (a - t)) + (a / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.45e+61], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+123], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+123}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\
\end{array}
\end{array}
if t < -2.45000000000000013e61Initial program 55.2%
associate--l+57.5%
sub-neg57.5%
distribute-frac-neg57.5%
distribute-rgt-neg-out57.5%
+-commutative57.5%
distribute-rgt-neg-out57.5%
distribute-lft-neg-in57.5%
associate-/l*73.4%
associate-/r/77.8%
fma-def77.8%
sub-neg77.8%
distribute-neg-in77.8%
remove-double-neg77.8%
+-commutative77.8%
sub-neg77.8%
Simplified77.8%
Taylor expanded in t around inf 62.6%
+-commutative62.6%
neg-mul-162.6%
associate-+r+80.4%
neg-mul-180.4%
distribute-rgt1-in80.4%
metadata-eval80.4%
mul0-lft80.4%
associate-/l*91.2%
Simplified91.2%
if -2.45000000000000013e61 < t < 6.60000000000000006e123Initial program 89.2%
associate--l+91.7%
associate-/l*95.1%
Simplified95.1%
if 6.60000000000000006e123 < t Initial program 57.8%
associate--l+61.8%
sub-neg61.8%
distribute-frac-neg61.8%
distribute-rgt-neg-out61.8%
+-commutative61.8%
distribute-rgt-neg-out61.8%
distribute-lft-neg-in61.8%
associate-/l*69.2%
associate-/r/80.9%
fma-def80.8%
sub-neg80.8%
distribute-neg-in80.8%
remove-double-neg80.8%
+-commutative80.8%
sub-neg80.8%
Simplified80.8%
Taylor expanded in y around 0 88.6%
Taylor expanded in t around inf 92.8%
associate-*r/92.8%
mul-1-neg92.8%
Simplified92.8%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.5e+76)
(+ x y)
(if (<= a -7e+20)
(- x (/ y (/ a z)))
(if (<= a 1.35e-136)
(+ x (/ (* y z) t))
(if (<= a 4e-30)
(- x (/ a (/ t y)))
(if (<= a 2.8e+57) (+ x (* y (/ z t))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+76) {
tmp = x + y;
} else if (a <= -7e+20) {
tmp = x - (y / (a / z));
} else if (a <= 1.35e-136) {
tmp = x + ((y * z) / t);
} else if (a <= 4e-30) {
tmp = x - (a / (t / y));
} else if (a <= 2.8e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + 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 (a <= (-1.5d+76)) then
tmp = x + y
else if (a <= (-7d+20)) then
tmp = x - (y / (a / z))
else if (a <= 1.35d-136) then
tmp = x + ((y * z) / t)
else if (a <= 4d-30) then
tmp = x - (a / (t / y))
else if (a <= 2.8d+57) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+76) {
tmp = x + y;
} else if (a <= -7e+20) {
tmp = x - (y / (a / z));
} else if (a <= 1.35e-136) {
tmp = x + ((y * z) / t);
} else if (a <= 4e-30) {
tmp = x - (a / (t / y));
} else if (a <= 2.8e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e+76: tmp = x + y elif a <= -7e+20: tmp = x - (y / (a / z)) elif a <= 1.35e-136: tmp = x + ((y * z) / t) elif a <= 4e-30: tmp = x - (a / (t / y)) elif a <= 2.8e+57: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e+76) tmp = Float64(x + y); elseif (a <= -7e+20) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (a <= 1.35e-136) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 4e-30) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (a <= 2.8e+57) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.5e+76) tmp = x + y; elseif (a <= -7e+20) tmp = x - (y / (a / z)); elseif (a <= 1.35e-136) tmp = x + ((y * z) / t); elseif (a <= 4e-30) tmp = x - (a / (t / y)); elseif (a <= 2.8e+57) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+76], N[(x + y), $MachinePrecision], If[LessEqual[a, -7e+20], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-136], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-30], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+57], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -7 \cdot 10^{+20}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-30}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.4999999999999999e76 or 2.8e57 < a Initial program 81.7%
associate--l+81.7%
sub-neg81.7%
distribute-frac-neg81.7%
distribute-rgt-neg-out81.7%
+-commutative81.7%
distribute-rgt-neg-out81.7%
distribute-lft-neg-in81.7%
associate-/l*90.9%
associate-/r/92.3%
fma-def92.3%
sub-neg92.3%
distribute-neg-in92.3%
remove-double-neg92.3%
+-commutative92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in a around inf 84.7%
+-commutative84.7%
Simplified84.7%
if -1.4999999999999999e76 < a < -7e20Initial program 63.2%
associate--l+73.1%
sub-neg73.1%
distribute-frac-neg73.1%
distribute-rgt-neg-out73.1%
+-commutative73.1%
distribute-rgt-neg-out73.1%
distribute-lft-neg-in73.1%
associate-/l*87.7%
associate-/r/90.7%
fma-def90.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in z around inf 73.5%
mul-1-neg73.5%
Simplified73.5%
Taylor expanded in a around inf 70.4%
mul-1-neg70.4%
sub-neg70.4%
associate-/l*80.5%
Simplified80.5%
if -7e20 < a < 1.3499999999999999e-136Initial program 76.2%
associate--l+80.5%
sub-neg80.5%
distribute-frac-neg80.5%
distribute-rgt-neg-out80.5%
+-commutative80.5%
distribute-rgt-neg-out80.5%
distribute-lft-neg-in80.5%
associate-/l*84.6%
associate-/r/85.5%
fma-def85.5%
sub-neg85.5%
distribute-neg-in85.5%
remove-double-neg85.5%
+-commutative85.5%
sub-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 92.4%
Taylor expanded in a around 0 81.0%
if 1.3499999999999999e-136 < a < 4e-30Initial program 85.8%
associate--l+88.6%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around inf 65.3%
distribute-lft-out--65.3%
associate-*r/65.3%
mul-1-neg65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in z around 0 69.0%
associate-/l*71.8%
Simplified71.8%
if 4e-30 < a < 2.8e57Initial program 81.3%
associate--l+81.8%
sub-neg81.8%
distribute-frac-neg81.8%
distribute-rgt-neg-out81.8%
+-commutative81.8%
distribute-rgt-neg-out81.8%
distribute-lft-neg-in81.8%
associate-/l*82.7%
associate-/r/90.7%
fma-def90.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in y around 0 95.1%
Taylor expanded in a around 0 77.0%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.42e+82)
(+ x y)
(if (<= a -5e+20)
(- x (/ y (/ a z)))
(if (<= a 1.5e-139)
(+ x (/ (* y z) t))
(if (<= a 1.2e-25)
(- x (/ (* y z) a))
(if (<= a 6e+57) (+ x (* y (/ z t))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+82) {
tmp = x + y;
} else if (a <= -5e+20) {
tmp = x - (y / (a / z));
} else if (a <= 1.5e-139) {
tmp = x + ((y * z) / t);
} else if (a <= 1.2e-25) {
tmp = x - ((y * z) / a);
} else if (a <= 6e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + 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 (a <= (-1.42d+82)) then
tmp = x + y
else if (a <= (-5d+20)) then
tmp = x - (y / (a / z))
else if (a <= 1.5d-139) then
tmp = x + ((y * z) / t)
else if (a <= 1.2d-25) then
tmp = x - ((y * z) / a)
else if (a <= 6d+57) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+82) {
tmp = x + y;
} else if (a <= -5e+20) {
tmp = x - (y / (a / z));
} else if (a <= 1.5e-139) {
tmp = x + ((y * z) / t);
} else if (a <= 1.2e-25) {
tmp = x - ((y * z) / a);
} else if (a <= 6e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.42e+82: tmp = x + y elif a <= -5e+20: tmp = x - (y / (a / z)) elif a <= 1.5e-139: tmp = x + ((y * z) / t) elif a <= 1.2e-25: tmp = x - ((y * z) / a) elif a <= 6e+57: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.42e+82) tmp = Float64(x + y); elseif (a <= -5e+20) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (a <= 1.5e-139) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 1.2e-25) tmp = Float64(x - Float64(Float64(y * z) / a)); elseif (a <= 6e+57) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.42e+82) tmp = x + y; elseif (a <= -5e+20) tmp = x - (y / (a / z)); elseif (a <= 1.5e-139) tmp = x + ((y * z) / t); elseif (a <= 1.2e-25) tmp = x - ((y * z) / a); elseif (a <= 6e+57) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.42e+82], N[(x + y), $MachinePrecision], If[LessEqual[a, -5e+20], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-139], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-25], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+57], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+82}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -5 \cdot 10^{+20}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-139}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-25}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.41999999999999993e82 or 5.9999999999999999e57 < a Initial program 81.7%
associate--l+81.7%
sub-neg81.7%
distribute-frac-neg81.7%
distribute-rgt-neg-out81.7%
+-commutative81.7%
distribute-rgt-neg-out81.7%
distribute-lft-neg-in81.7%
associate-/l*90.9%
associate-/r/92.3%
fma-def92.3%
sub-neg92.3%
distribute-neg-in92.3%
remove-double-neg92.3%
+-commutative92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in a around inf 84.7%
+-commutative84.7%
Simplified84.7%
if -1.41999999999999993e82 < a < -5e20Initial program 63.2%
associate--l+73.1%
sub-neg73.1%
distribute-frac-neg73.1%
distribute-rgt-neg-out73.1%
+-commutative73.1%
distribute-rgt-neg-out73.1%
distribute-lft-neg-in73.1%
associate-/l*87.7%
associate-/r/90.7%
fma-def90.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in z around inf 73.5%
mul-1-neg73.5%
Simplified73.5%
Taylor expanded in a around inf 70.4%
mul-1-neg70.4%
sub-neg70.4%
associate-/l*80.5%
Simplified80.5%
if -5e20 < a < 1.5e-139Initial program 75.9%
associate--l+80.3%
sub-neg80.3%
distribute-frac-neg80.3%
distribute-rgt-neg-out80.3%
+-commutative80.3%
distribute-rgt-neg-out80.3%
distribute-lft-neg-in80.3%
associate-/l*84.5%
associate-/r/85.4%
fma-def85.3%
sub-neg85.3%
distribute-neg-in85.3%
remove-double-neg85.3%
+-commutative85.3%
sub-neg85.3%
Simplified85.3%
Taylor expanded in y around 0 92.3%
Taylor expanded in a around 0 80.8%
if 1.5e-139 < a < 1.20000000000000005e-25Initial program 86.6%
associate--l+89.3%
sub-neg89.3%
distribute-frac-neg89.3%
distribute-rgt-neg-out89.3%
+-commutative89.3%
distribute-rgt-neg-out89.3%
distribute-lft-neg-in89.3%
associate-/l*91.9%
associate-/r/89.2%
fma-def89.3%
sub-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
+-commutative89.3%
sub-neg89.3%
Simplified89.3%
Taylor expanded in z around inf 91.3%
mul-1-neg91.3%
Simplified91.3%
Taylor expanded in t around 0 75.0%
if 1.20000000000000005e-25 < a < 5.9999999999999999e57Initial program 80.4%
associate--l+80.9%
sub-neg80.9%
distribute-frac-neg80.9%
distribute-rgt-neg-out80.9%
+-commutative80.9%
distribute-rgt-neg-out80.9%
distribute-lft-neg-in80.9%
associate-/l*81.8%
associate-/r/90.3%
fma-def90.2%
sub-neg90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
+-commutative90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in y around 0 94.9%
Taylor expanded in a around 0 80.6%
Final simplification81.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.4e+61) (not (<= t 9.5e+127))) (+ x (/ y (/ t (- z a)))) (+ x (+ y (/ (- t z) (/ (- a t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.4e+61) || !(t <= 9.5e+127)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / 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 ((t <= (-7.4d+61)) .or. (.not. (t <= 9.5d+127))) then
tmp = x + (y / (t / (z - a)))
else
tmp = x + (y + ((t - z) / ((a - t) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.4e+61) || !(t <= 9.5e+127)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.4e+61) or not (t <= 9.5e+127): tmp = x + (y / (t / (z - a))) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.4e+61) || !(t <= 9.5e+127)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -7.4e+61) || ~((t <= 9.5e+127))) tmp = x + (y / (t / (z - a))); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.4e+61], N[Not[LessEqual[t, 9.5e+127]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{+61} \lor \neg \left(t \leq 9.5 \cdot 10^{+127}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if t < -7.40000000000000005e61 or 9.49999999999999975e127 < t Initial program 56.4%
associate--l+59.5%
sub-neg59.5%
distribute-frac-neg59.5%
distribute-rgt-neg-out59.5%
+-commutative59.5%
distribute-rgt-neg-out59.5%
distribute-lft-neg-in59.5%
associate-/l*71.5%
associate-/r/79.2%
fma-def79.2%
sub-neg79.2%
distribute-neg-in79.2%
remove-double-neg79.2%
+-commutative79.2%
sub-neg79.2%
Simplified79.2%
Taylor expanded in t around inf 64.9%
+-commutative64.9%
neg-mul-164.9%
associate-+r+79.8%
neg-mul-179.8%
distribute-rgt1-in79.8%
metadata-eval79.8%
mul0-lft79.8%
associate-/l*91.6%
Simplified91.6%
if -7.40000000000000005e61 < t < 9.49999999999999975e127Initial program 89.2%
associate--l+91.7%
associate-/l*95.1%
Simplified95.1%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (+ x (* y (- (+ (/ t (- a t)) 1.0) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (a - 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 * (((t / (a - t)) + 1.0d0) - (z / (a - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
}
def code(x, y, z, t, a): return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(Float64(t / Float64(a - t)) + 1.0) - Float64(z / Float64(a - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right)
\end{array}
Initial program 78.9%
associate--l+81.6%
sub-neg81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
distribute-rgt-neg-out81.6%
distribute-lft-neg-in81.6%
associate-/l*87.7%
associate-/r/89.0%
fma-def88.9%
sub-neg88.9%
distribute-neg-in88.9%
remove-double-neg88.9%
+-commutative88.9%
sub-neg88.9%
Simplified88.9%
Taylor expanded in y around 0 92.4%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.1e-72)
(+ x y)
(if (<= a 1.35e-136)
(+ x (/ (* y z) t))
(if (<= a 3.2e-30)
(- x (/ a (/ t y)))
(if (<= a 5.9e+57) (+ x (* y (/ z t))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e-72) {
tmp = x + y;
} else if (a <= 1.35e-136) {
tmp = x + ((y * z) / t);
} else if (a <= 3.2e-30) {
tmp = x - (a / (t / y));
} else if (a <= 5.9e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + 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 (a <= (-2.1d-72)) then
tmp = x + y
else if (a <= 1.35d-136) then
tmp = x + ((y * z) / t)
else if (a <= 3.2d-30) then
tmp = x - (a / (t / y))
else if (a <= 5.9d+57) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e-72) {
tmp = x + y;
} else if (a <= 1.35e-136) {
tmp = x + ((y * z) / t);
} else if (a <= 3.2e-30) {
tmp = x - (a / (t / y));
} else if (a <= 5.9e+57) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e-72: tmp = x + y elif a <= 1.35e-136: tmp = x + ((y * z) / t) elif a <= 3.2e-30: tmp = x - (a / (t / y)) elif a <= 5.9e+57: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e-72) tmp = Float64(x + y); elseif (a <= 1.35e-136) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 3.2e-30) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (a <= 5.9e+57) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e-72) tmp = x + y; elseif (a <= 1.35e-136) tmp = x + ((y * z) / t); elseif (a <= 3.2e-30) tmp = x - (a / (t / y)); elseif (a <= 5.9e+57) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e-72], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.35e-136], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e-30], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.9e+57], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-72}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-30}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 5.9 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.1e-72 or 5.90000000000000013e57 < a Initial program 77.3%
associate--l+78.7%
sub-neg78.7%
distribute-frac-neg78.7%
distribute-rgt-neg-out78.7%
+-commutative78.7%
distribute-rgt-neg-out78.7%
distribute-lft-neg-in78.7%
associate-/l*89.2%
associate-/r/90.6%
fma-def90.6%
sub-neg90.6%
distribute-neg-in90.6%
remove-double-neg90.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
Taylor expanded in a around inf 74.2%
+-commutative74.2%
Simplified74.2%
if -2.1e-72 < a < 1.3499999999999999e-136Initial program 77.7%
associate--l+82.8%
sub-neg82.8%
distribute-frac-neg82.8%
distribute-rgt-neg-out82.8%
+-commutative82.8%
distribute-rgt-neg-out82.8%
distribute-lft-neg-in82.8%
associate-/l*85.3%
associate-/r/86.4%
fma-def86.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in y around 0 93.4%
Taylor expanded in a around 0 87.8%
if 1.3499999999999999e-136 < a < 3.2e-30Initial program 85.8%
associate--l+88.6%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around inf 65.3%
distribute-lft-out--65.3%
associate-*r/65.3%
mul-1-neg65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in z around 0 69.0%
associate-/l*71.8%
Simplified71.8%
if 3.2e-30 < a < 5.90000000000000013e57Initial program 81.3%
associate--l+81.8%
sub-neg81.8%
distribute-frac-neg81.8%
distribute-rgt-neg-out81.8%
+-commutative81.8%
distribute-rgt-neg-out81.8%
distribute-lft-neg-in81.8%
associate-/l*82.7%
associate-/r/90.7%
fma-def90.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in y around 0 95.1%
Taylor expanded in a around 0 77.0%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.95e+88)
(+ x y)
(if (<= a 6.3e+58)
(+ x (/ z (/ (- a t) (- y))))
(+ y (- x (/ y (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e+88) {
tmp = x + y;
} else if (a <= 6.3e+58) {
tmp = x + (z / ((a - t) / -y));
} else {
tmp = y + (x - (y / (a / 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 (a <= (-1.95d+88)) then
tmp = x + y
else if (a <= 6.3d+58) then
tmp = x + (z / ((a - t) / -y))
else
tmp = y + (x - (y / (a / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e+88) {
tmp = x + y;
} else if (a <= 6.3e+58) {
tmp = x + (z / ((a - t) / -y));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.95e+88: tmp = x + y elif a <= 6.3e+58: tmp = x + (z / ((a - t) / -y)) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.95e+88) tmp = Float64(x + y); elseif (a <= 6.3e+58) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / Float64(-y)))); else tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.95e+88) tmp = x + y; elseif (a <= 6.3e+58) tmp = x + (z / ((a - t) / -y)); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.95e+88], N[(x + y), $MachinePrecision], If[LessEqual[a, 6.3e+58], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+88}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 6.3 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{-y}}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if a < -1.9500000000000001e88Initial program 76.2%
associate--l+76.1%
sub-neg76.1%
distribute-frac-neg76.1%
distribute-rgt-neg-out76.1%
+-commutative76.1%
distribute-rgt-neg-out76.1%
distribute-lft-neg-in76.1%
associate-/l*89.7%
associate-/r/89.4%
fma-def89.4%
sub-neg89.4%
distribute-neg-in89.4%
remove-double-neg89.4%
+-commutative89.4%
sub-neg89.4%
Simplified89.4%
Taylor expanded in a around inf 86.7%
+-commutative86.7%
Simplified86.7%
if -1.9500000000000001e88 < a < 6.2999999999999995e58Initial program 77.5%
associate--l+81.6%
sub-neg81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
distribute-rgt-neg-out81.6%
distribute-lft-neg-in81.6%
associate-/l*86.0%
associate-/r/87.3%
fma-def87.2%
sub-neg87.2%
distribute-neg-in87.2%
remove-double-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Taylor expanded in y around 0 91.9%
Taylor expanded in z around inf 86.2%
associate-*r/86.2%
associate-*r*86.2%
neg-mul-186.2%
*-commutative86.2%
associate-/l*88.1%
Simplified88.1%
if 6.2999999999999995e58 < a Initial program 84.5%
+-commutative84.5%
associate--l+84.5%
sub-neg84.5%
distribute-frac-neg84.5%
distribute-rgt-neg-out84.5%
distribute-rgt-neg-out84.5%
distribute-frac-neg84.5%
sub-neg84.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around 0 84.6%
associate-/l*91.6%
Simplified91.6%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.5e+47) (not (<= t 1.45e-61))) (+ x (* y (/ z t))) (+ y (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+47) || !(t <= 1.45e-61)) {
tmp = x + (y * (z / t));
} else {
tmp = y + (x - (y / (a / 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 ((t <= (-2.5d+47)) .or. (.not. (t <= 1.45d-61))) then
tmp = x + (y * (z / t))
else
tmp = y + (x - (y / (a / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+47) || !(t <= 1.45e-61)) {
tmp = x + (y * (z / t));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e+47) or not (t <= 1.45e-61): tmp = x + (y * (z / t)) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e+47) || !(t <= 1.45e-61)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e+47) || ~((t <= 1.45e-61))) tmp = x + (y * (z / t)); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e+47], N[Not[LessEqual[t, 1.45e-61]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+47} \lor \neg \left(t \leq 1.45 \cdot 10^{-61}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if t < -2.50000000000000011e47 or 1.45e-61 < t Initial program 66.2%
associate--l+70.8%
sub-neg70.8%
distribute-frac-neg70.8%
distribute-rgt-neg-out70.8%
+-commutative70.8%
distribute-rgt-neg-out70.8%
distribute-lft-neg-in70.8%
associate-/l*79.7%
associate-/r/84.4%
fma-def84.4%
sub-neg84.4%
distribute-neg-in84.4%
remove-double-neg84.4%
+-commutative84.4%
sub-neg84.4%
Simplified84.4%
Taylor expanded in y around 0 89.8%
Taylor expanded in a around 0 80.8%
if -2.50000000000000011e47 < t < 1.45e-61Initial program 92.0%
+-commutative92.0%
associate--l+92.0%
sub-neg92.0%
distribute-frac-neg92.0%
distribute-rgt-neg-out92.0%
distribute-rgt-neg-out92.0%
distribute-frac-neg92.0%
sub-neg92.0%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in t around 0 82.8%
associate-/l*83.3%
Simplified83.3%
Final simplification82.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.3e+90) (+ x y) (if (<= a 1.08e+59) (- x (* y (/ z (- a t)))) (+ y (- x (/ y (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+90) {
tmp = x + y;
} else if (a <= 1.08e+59) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = y + (x - (y / (a / 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 (a <= (-3.3d+90)) then
tmp = x + y
else if (a <= 1.08d+59) then
tmp = x - (y * (z / (a - t)))
else
tmp = y + (x - (y / (a / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+90) {
tmp = x + y;
} else if (a <= 1.08e+59) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.3e+90: tmp = x + y elif a <= 1.08e+59: tmp = x - (y * (z / (a - t))) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e+90) tmp = Float64(x + y); elseif (a <= 1.08e+59) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.3e+90) tmp = x + y; elseif (a <= 1.08e+59) tmp = x - (y * (z / (a - t))); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e+90], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.08e+59], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+90}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{+59}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if a < -3.30000000000000008e90Initial program 76.2%
associate--l+76.1%
sub-neg76.1%
distribute-frac-neg76.1%
distribute-rgt-neg-out76.1%
+-commutative76.1%
distribute-rgt-neg-out76.1%
distribute-lft-neg-in76.1%
associate-/l*89.7%
associate-/r/89.4%
fma-def89.4%
sub-neg89.4%
distribute-neg-in89.4%
remove-double-neg89.4%
+-commutative89.4%
sub-neg89.4%
Simplified89.4%
Taylor expanded in a around inf 86.7%
+-commutative86.7%
Simplified86.7%
if -3.30000000000000008e90 < a < 1.08e59Initial program 77.5%
associate--l+81.6%
sub-neg81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
distribute-rgt-neg-out81.6%
distribute-lft-neg-in81.6%
associate-/l*86.0%
associate-/r/87.3%
fma-def87.2%
sub-neg87.2%
distribute-neg-in87.2%
remove-double-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Taylor expanded in z around inf 86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in x around 0 86.2%
mul-1-neg86.2%
sub-neg86.2%
*-rgt-identity86.2%
associate-*r/86.2%
associate-*l*87.3%
*-commutative87.3%
associate-*l/87.3%
*-lft-identity87.3%
Simplified87.3%
if 1.08e59 < a Initial program 84.5%
+-commutative84.5%
associate--l+84.5%
sub-neg84.5%
distribute-frac-neg84.5%
distribute-rgt-neg-out84.5%
distribute-rgt-neg-out84.5%
distribute-frac-neg84.5%
sub-neg84.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around 0 84.6%
associate-/l*91.6%
Simplified91.6%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.5e+88) (+ x y) (if (<= a 3.1e+59) (- x (/ y (/ (- a t) z))) (+ y (- x (/ y (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+88) {
tmp = x + y;
} else if (a <= 3.1e+59) {
tmp = x - (y / ((a - t) / z));
} else {
tmp = y + (x - (y / (a / 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 (a <= (-4.5d+88)) then
tmp = x + y
else if (a <= 3.1d+59) then
tmp = x - (y / ((a - t) / z))
else
tmp = y + (x - (y / (a / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+88) {
tmp = x + y;
} else if (a <= 3.1e+59) {
tmp = x - (y / ((a - t) / z));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e+88: tmp = x + y elif a <= 3.1e+59: tmp = x - (y / ((a - t) / z)) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e+88) tmp = Float64(x + y); elseif (a <= 3.1e+59) tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e+88) tmp = x + y; elseif (a <= 3.1e+59) tmp = x - (y / ((a - t) / z)); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e+88], N[(x + y), $MachinePrecision], If[LessEqual[a, 3.1e+59], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+88}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+59}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if a < -4.5e88Initial program 76.2%
associate--l+76.1%
sub-neg76.1%
distribute-frac-neg76.1%
distribute-rgt-neg-out76.1%
+-commutative76.1%
distribute-rgt-neg-out76.1%
distribute-lft-neg-in76.1%
associate-/l*89.7%
associate-/r/89.4%
fma-def89.4%
sub-neg89.4%
distribute-neg-in89.4%
remove-double-neg89.4%
+-commutative89.4%
sub-neg89.4%
Simplified89.4%
Taylor expanded in a around inf 86.7%
+-commutative86.7%
Simplified86.7%
if -4.5e88 < a < 3.10000000000000015e59Initial program 77.5%
associate--l+81.6%
sub-neg81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
distribute-rgt-neg-out81.6%
distribute-lft-neg-in81.6%
associate-/l*86.0%
associate-/r/87.3%
fma-def87.2%
sub-neg87.2%
distribute-neg-in87.2%
remove-double-neg87.2%
+-commutative87.2%
sub-neg87.2%
Simplified87.2%
Taylor expanded in z around inf 86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in x around 0 86.2%
mul-1-neg86.2%
sub-neg86.2%
associate-/l*87.3%
Simplified87.3%
if 3.10000000000000015e59 < a Initial program 84.5%
+-commutative84.5%
associate--l+84.5%
sub-neg84.5%
distribute-frac-neg84.5%
distribute-rgt-neg-out84.5%
distribute-rgt-neg-out84.5%
distribute-frac-neg84.5%
sub-neg84.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around 0 84.6%
associate-/l*91.6%
Simplified91.6%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e+29) (not (<= a 3e+57))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e+29) || !(a <= 3e+57)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
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 ((a <= (-5.2d+29)) .or. (.not. (a <= 3d+57))) then
tmp = x + y
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e+29) || !(a <= 3e+57)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.2e+29) or not (a <= 3e+57): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e+29) || !(a <= 3e+57)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.2e+29) || ~((a <= 3e+57))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e+29], N[Not[LessEqual[a, 3e+57]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{+29} \lor \neg \left(a \leq 3 \cdot 10^{+57}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -5.2e29 or 3e57 < a Initial program 80.3%
associate--l+80.8%
sub-neg80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
+-commutative80.8%
distribute-rgt-neg-out80.8%
distribute-lft-neg-in80.8%
associate-/l*90.2%
associate-/r/91.9%
fma-def91.9%
sub-neg91.9%
distribute-neg-in91.9%
remove-double-neg91.9%
+-commutative91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in a around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -5.2e29 < a < 3e57Initial program 78.1%
associate--l+82.1%
sub-neg82.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
+-commutative82.1%
distribute-rgt-neg-out82.1%
distribute-lft-neg-in82.1%
associate-/l*86.0%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
distribute-neg-in87.1%
remove-double-neg87.1%
+-commutative87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in a around 0 74.2%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.4e+29) (not (<= a 4.6e+58))) (+ x y) (+ x (/ z (/ t y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e+29) || !(a <= 4.6e+58)) {
tmp = x + y;
} else {
tmp = x + (z / (t / 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 ((a <= (-3.4d+29)) .or. (.not. (a <= 4.6d+58))) then
tmp = x + y
else
tmp = x + (z / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e+29) || !(a <= 4.6e+58)) {
tmp = x + y;
} else {
tmp = x + (z / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.4e+29) or not (a <= 4.6e+58): tmp = x + y else: tmp = x + (z / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.4e+29) || !(a <= 4.6e+58)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.4e+29) || ~((a <= 4.6e+58))) tmp = x + y; else tmp = x + (z / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.4e+29], N[Not[LessEqual[a, 4.6e+58]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+29} \lor \neg \left(a \leq 4.6 \cdot 10^{+58}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\end{array}
\end{array}
if a < -3.39999999999999981e29 or 4.60000000000000005e58 < a Initial program 80.3%
associate--l+80.8%
sub-neg80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
+-commutative80.8%
distribute-rgt-neg-out80.8%
distribute-lft-neg-in80.8%
associate-/l*90.2%
associate-/r/91.9%
fma-def91.9%
sub-neg91.9%
distribute-neg-in91.9%
remove-double-neg91.9%
+-commutative91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in a around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -3.39999999999999981e29 < a < 4.60000000000000005e58Initial program 78.1%
associate--l+82.1%
sub-neg82.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
+-commutative82.1%
distribute-rgt-neg-out82.1%
distribute-lft-neg-in82.1%
associate-/l*86.0%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
distribute-neg-in87.1%
remove-double-neg87.1%
+-commutative87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in z around inf 87.1%
associate-*r/87.1%
associate-*r*87.1%
neg-mul-187.1%
*-commutative87.1%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in a around 0 74.5%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.1e-75) (not (<= a 9.8e+57))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e-75) || !(a <= 9.8e+57)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
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 ((a <= (-4.1d-75)) .or. (.not. (a <= 9.8d+57))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.1e-75) || !(a <= 9.8e+57)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.1e-75) or not (a <= 9.8e+57): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.1e-75) || !(a <= 9.8e+57)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.1e-75) || ~((a <= 9.8e+57))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.1e-75], N[Not[LessEqual[a, 9.8e+57]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{-75} \lor \neg \left(a \leq 9.8 \cdot 10^{+57}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -4.10000000000000002e-75 or 9.7999999999999998e57 < a Initial program 77.3%
associate--l+78.7%
sub-neg78.7%
distribute-frac-neg78.7%
distribute-rgt-neg-out78.7%
+-commutative78.7%
distribute-rgt-neg-out78.7%
distribute-lft-neg-in78.7%
associate-/l*89.2%
associate-/r/90.6%
fma-def90.6%
sub-neg90.6%
distribute-neg-in90.6%
remove-double-neg90.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
Taylor expanded in a around inf 74.2%
+-commutative74.2%
Simplified74.2%
if -4.10000000000000002e-75 < a < 9.7999999999999998e57Initial program 80.3%
associate--l+84.1%
sub-neg84.1%
distribute-frac-neg84.1%
distribute-rgt-neg-out84.1%
+-commutative84.1%
distribute-rgt-neg-out84.1%
distribute-lft-neg-in84.1%
associate-/l*86.4%
associate-/r/87.6%
fma-def87.5%
sub-neg87.5%
distribute-neg-in87.5%
remove-double-neg87.5%
+-commutative87.5%
sub-neg87.5%
Simplified87.5%
Taylor expanded in y around 0 92.5%
Taylor expanded in a around 0 77.9%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (<= z 1.9e+159) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.9e+159) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
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.9d+159) then
tmp = x + y
else
tmp = y * (z / t)
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.9e+159) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 1.9e+159: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 1.9e+159) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 1.9e+159) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1.9e+159], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{+159}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < 1.89999999999999983e159Initial program 77.9%
associate--l+80.9%
sub-neg80.9%
distribute-frac-neg80.9%
distribute-rgt-neg-out80.9%
+-commutative80.9%
distribute-rgt-neg-out80.9%
distribute-lft-neg-in80.9%
associate-/l*87.2%
associate-/r/88.6%
fma-def88.6%
sub-neg88.6%
distribute-neg-in88.6%
remove-double-neg88.6%
+-commutative88.6%
sub-neg88.6%
Simplified88.6%
Taylor expanded in a around inf 66.7%
+-commutative66.7%
Simplified66.7%
if 1.89999999999999983e159 < z Initial program 88.5%
+-commutative88.5%
associate--l+88.5%
sub-neg88.5%
distribute-frac-neg88.5%
distribute-rgt-neg-out88.5%
distribute-rgt-neg-out88.5%
distribute-frac-neg88.5%
sub-neg88.5%
associate-/l*92.3%
Simplified92.3%
div-inv92.4%
Applied egg-rr92.4%
Taylor expanded in z around inf 69.5%
mul-1-neg69.5%
*-commutative69.5%
associate-*l/69.4%
*-commutative69.4%
distribute-rgt-neg-in69.4%
distribute-neg-frac69.4%
Simplified69.4%
Taylor expanded in a around 0 48.1%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 5e+14) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 5e+14) {
tmp = x + 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 (t <= 5d+14) then
tmp = x + 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 (t <= 5e+14) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 5e+14: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 5e+14) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 5e+14) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 5e+14], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{+14}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 5e14Initial program 83.7%
associate--l+85.1%
sub-neg85.1%
distribute-frac-neg85.1%
distribute-rgt-neg-out85.1%
+-commutative85.1%
distribute-rgt-neg-out85.1%
distribute-lft-neg-in85.1%
associate-/l*90.7%
associate-/r/90.2%
fma-def90.2%
sub-neg90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
+-commutative90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in a around inf 63.3%
+-commutative63.3%
Simplified63.3%
if 5e14 < t Initial program 64.6%
associate--l+71.1%
sub-neg71.1%
distribute-frac-neg71.1%
distribute-rgt-neg-out71.1%
+-commutative71.1%
distribute-rgt-neg-out71.1%
distribute-lft-neg-in71.1%
associate-/l*78.5%
associate-/r/85.3%
fma-def85.2%
sub-neg85.2%
distribute-neg-in85.2%
remove-double-neg85.2%
+-commutative85.2%
sub-neg85.2%
Simplified85.2%
Taylor expanded in x around inf 68.2%
Final simplification64.5%
(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 78.9%
associate--l+81.6%
sub-neg81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
distribute-rgt-neg-out81.6%
distribute-lft-neg-in81.6%
associate-/l*87.7%
associate-/r/89.0%
fma-def88.9%
sub-neg88.9%
distribute-neg-in88.9%
remove-double-neg88.9%
+-commutative88.9%
sub-neg88.9%
Simplified88.9%
Taylor expanded in x around inf 54.6%
Final simplification54.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} 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 + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
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 + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023320
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))