
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+140)
(+ (* a 120.0) (* y (/ -60.0 z)))
(if (<= (* a 120.0) -2e-6)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 100.0) (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+140) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = a * 120.0;
}
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 * 120.0d0) <= (-4d+140)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else if ((a * 120.0d0) <= (-2d-6)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 100.0d0) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+140) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+140: tmp = (a * 120.0) + (y * (-60.0 / z)) elif (a * 120.0) <= -2e-6: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 100.0: tmp = (60.0 * (x - y)) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+140) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); elseif (Float64(a * 120.0) <= -2e-6) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 100.0) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+140) tmp = (a * 120.0) + (y * (-60.0 / z)); elseif ((a * 120.0) <= -2e-6) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 100.0) tmp = (60.0 * (x - y)) / (z - t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+140], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-6], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100.0], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+140}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 100:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000024e140Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 87.2%
associate-*r/87.1%
*-commutative87.1%
*-lft-identity87.1%
times-frac87.2%
/-rgt-identity87.2%
Simplified87.2%
Taylor expanded in z around inf 81.2%
if -4.00000000000000024e140 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999991e-6Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 86.7%
associate-*r/87.0%
*-commutative87.0%
*-lft-identity87.0%
times-frac86.7%
/-rgt-identity86.7%
Simplified86.7%
Taylor expanded in z around 0 75.8%
if -1.99999999999999991e-6 < (*.f64 a #s(literal 120 binary64)) < 100Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 77.6%
associate-*r/77.7%
Simplified77.7%
if 100 < (*.f64 a #s(literal 120 binary64)) Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 81.0%
Final simplification78.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+140)
(+ (* a 120.0) (* y (/ -60.0 z)))
(if (<= (* a 120.0) -2e-6)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 100.0) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+140) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
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 * 120.0d0) <= (-4d+140)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else if ((a * 120.0d0) <= (-2d-6)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 100.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+140) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+140: tmp = (a * 120.0) + (y * (-60.0 / z)) elif (a * 120.0) <= -2e-6: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 100.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+140) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); elseif (Float64(a * 120.0) <= -2e-6) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 100.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+140) tmp = (a * 120.0) + (y * (-60.0 / z)); elseif ((a * 120.0) <= -2e-6) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 100.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+140], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-6], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+140}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 100:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000024e140Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 87.2%
associate-*r/87.1%
*-commutative87.1%
*-lft-identity87.1%
times-frac87.2%
/-rgt-identity87.2%
Simplified87.2%
Taylor expanded in z around inf 81.2%
if -4.00000000000000024e140 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999991e-6Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 86.7%
associate-*r/87.0%
*-commutative87.0%
*-lft-identity87.0%
times-frac86.7%
/-rgt-identity86.7%
Simplified86.7%
Taylor expanded in z around 0 75.8%
if -1.99999999999999991e-6 < (*.f64 a #s(literal 120 binary64)) < 100Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.6%
if 100 < (*.f64 a #s(literal 120 binary64)) Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 81.0%
Final simplification78.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+124)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) -2e-6)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 100.0) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+124) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
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 * 120.0d0) <= (-4d+124)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= (-2d-6)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 100.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+124) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= -2e-6) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 100.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+124: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= -2e-6: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 100.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+124) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= -2e-6) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 100.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+124) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= -2e-6) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 100.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+124], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-6], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+124}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 100:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -3.99999999999999979e124Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 87.9%
Taylor expanded in z around 0 73.3%
if -3.99999999999999979e124 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999991e-6Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.7%
associate-*r/88.8%
*-commutative88.8%
*-lft-identity88.8%
times-frac88.7%
/-rgt-identity88.7%
Simplified88.7%
Taylor expanded in z around 0 84.3%
if -1.99999999999999991e-6 < (*.f64 a #s(literal 120 binary64)) < 100Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.6%
if 100 < (*.f64 a #s(literal 120 binary64)) Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 81.0%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+62)
(* a 120.0)
(if (<= (- z t) 1e-6)
(/ (* 60.0 (- x y)) z)
(if (<= (- z t) 2e+34) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+62) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-6) {
tmp = (60.0 * (x - y)) / z;
} else if ((z - t) <= 2e+34) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
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 - t) <= (-5d+62)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d-6) then
tmp = (60.0d0 * (x - y)) / z
else if ((z - t) <= 2d+34) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+62) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-6) {
tmp = (60.0 * (x - y)) / z;
} else if ((z - t) <= 2e+34) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+62: tmp = a * 120.0 elif (z - t) <= 1e-6: tmp = (60.0 * (x - y)) / z elif (z - t) <= 2e+34: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+62) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e-6) tmp = Float64(Float64(60.0 * Float64(x - y)) / z); elseif (Float64(z - t) <= 2e+34) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+62) tmp = a * 120.0; elseif ((z - t) <= 1e-6) tmp = (60.0 * (x - y)) / z; elseif ((z - t) <= 2e+34) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-6], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+34], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{-6}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+34}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5.00000000000000029e62 or 1.99999999999999989e34 < (-.f64 z t) Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 65.7%
if -5.00000000000000029e62 < (-.f64 z t) < 9.99999999999999955e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.3%
Taylor expanded in z around inf 56.1%
associate-*r/56.1%
Applied egg-rr56.1%
if 9.99999999999999955e-7 < (-.f64 z t) < 1.99999999999999989e34Initial program 100.0%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 71.0%
Taylor expanded in z around 0 71.0%
Final simplification63.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+62)
(* a 120.0)
(if (<= (- z t) 1e-6)
(* 60.0 (/ (- x y) z))
(if (<= (- z t) 2e+34) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+62) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-6) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+34) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
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 - t) <= (-5d+62)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d-6) then
tmp = 60.0d0 * ((x - y) / z)
else if ((z - t) <= 2d+34) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+62) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-6) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+34) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+62: tmp = a * 120.0 elif (z - t) <= 1e-6: tmp = 60.0 * ((x - y) / z) elif (z - t) <= 2e+34: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+62) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e-6) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(z - t) <= 2e+34) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+62) tmp = a * 120.0; elseif ((z - t) <= 1e-6) tmp = 60.0 * ((x - y) / z); elseif ((z - t) <= 2e+34) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-6], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+34], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{-6}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+34}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5.00000000000000029e62 or 1.99999999999999989e34 < (-.f64 z t) Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 65.7%
if -5.00000000000000029e62 < (-.f64 z t) < 9.99999999999999955e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.3%
Taylor expanded in z around inf 56.1%
if 9.99999999999999955e-7 < (-.f64 z t) < 1.99999999999999989e34Initial program 100.0%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 71.0%
Taylor expanded in z around 0 71.0%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-6) (not (<= (* a 120.0) 1e-69))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (/ (* 60.0 (- x y)) (- z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-6) || !((a * 120.0) <= 1e-69)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (60.0 * (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 * 120.0d0) <= (-1d-6)) .or. (.not. ((a * 120.0d0) <= 1d-69))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (60.0d0 * (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 * 120.0) <= -1e-6) || !((a * 120.0) <= 1e-69)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-6) or not ((a * 120.0) <= 1e-69): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-6) || !(Float64(a * 120.0) <= 1e-69)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-6) || ~(((a * 120.0) <= 1e-69))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-6], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-69]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-6} \lor \neg \left(a \cdot 120 \leq 10^{-69}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.99999999999999955e-7 or 9.9999999999999996e-70 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.4%
if -9.99999999999999955e-7 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999996e-70Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 81.1%
associate-*r/81.2%
Simplified81.2%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-6) (not (<= (* a 120.0) 100.0))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-6) || !((a * 120.0) <= 100.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((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 * 120.0d0) <= (-1d-6)) .or. (.not. ((a * 120.0d0) <= 100.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((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 * 120.0) <= -1e-6) || !((a * 120.0) <= 100.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-6) or not ((a * 120.0) <= 100.0): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-6) || !(Float64(a * 120.0) <= 100.0)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-6) || ~(((a * 120.0) <= 100.0))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-6], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 100.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-6} \lor \neg \left(a \cdot 120 \leq 100\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.99999999999999955e-7 or 100 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
*-commutative99.9%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 74.4%
if -9.99999999999999955e-7 < (*.f64 a #s(literal 120 binary64)) < 100Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.2%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.6e+99) (not (<= y 1.45e+96))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ (* 60.0 x) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.6e+99) || !(y <= 1.45e+96)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (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 ((y <= (-2.6d+99)) .or. (.not. (y <= 1.45d+96))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / (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 ((y <= -2.6e+99) || !(y <= 1.45e+96)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.6e+99) or not (y <= 1.45e+96): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.6e+99) || !(y <= 1.45e+96)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.6e+99) || ~((y <= 1.45e+96))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.6e+99], N[Not[LessEqual[y, 1.45e+96]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+99} \lor \neg \left(y \leq 1.45 \cdot 10^{+96}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if y < -2.6e99 or 1.44999999999999989e96 < y Initial program 99.8%
Taylor expanded in x around 0 95.4%
if -2.6e99 < y < 1.44999999999999989e96Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.0%
associate-*r/89.1%
Simplified89.1%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.1e+98) (not (<= y 1.65e+95))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* 60.0 (/ x (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.1e+98) || !(y <= 1.65e+95)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / (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 ((y <= (-5.1d+98)) .or. (.not. (y <= 1.65d+95))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / (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 ((y <= -5.1e+98) || !(y <= 1.65e+95)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.1e+98) or not (y <= 1.65e+95): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.1e+98) || !(y <= 1.65e+95)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.1e+98) || ~((y <= 1.65e+95))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.1e+98], N[Not[LessEqual[y, 1.65e+95]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+98} \lor \neg \left(y \leq 1.65 \cdot 10^{+95}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -5.09999999999999988e98 or 1.6499999999999999e95 < y Initial program 99.8%
Taylor expanded in x around 0 95.4%
if -5.09999999999999988e98 < y < 1.6499999999999999e95Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.0%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+98) (not (<= y 2.3e+95))) (+ (* a 120.0) (* y (/ -60.0 (- z t)))) (+ (* a 120.0) (* 60.0 (/ x (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+98) || !(y <= 2.3e+95)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 * (x / (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 ((y <= (-3.2d+98)) .or. (.not. (y <= 2.3d+95))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / (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 ((y <= -3.2e+98) || !(y <= 2.3e+95)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+98) or not (y <= 2.3e+95): tmp = (a * 120.0) + (y * (-60.0 / (z - t))) else: tmp = (a * 120.0) + (60.0 * (x / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+98) || !(y <= 2.3e+95)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.2e+98) || ~((y <= 2.3e+95))) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+98], N[Not[LessEqual[y, 2.3e+95]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+98} \lor \neg \left(y \leq 2.3 \cdot 10^{+95}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -3.2000000000000002e98 or 2.29999999999999997e95 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 95.3%
associate-*r/95.4%
*-commutative95.4%
*-lft-identity95.4%
times-frac95.3%
/-rgt-identity95.3%
Simplified95.3%
if -3.2000000000000002e98 < y < 2.29999999999999997e95Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.0%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+117) (not (<= (- z t) 2e+34))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+117) || !((z - t) <= 2e+34)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / 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 - t) <= (-5d+117)) .or. (.not. ((z - t) <= 2d+34))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / 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 - t) <= -5e+117) || !((z - t) <= 2e+34)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+117) or not ((z - t) <= 2e+34): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e+117) || !(Float64(z - t) <= 2e+34)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e+117) || ~(((z - t) <= 2e+34))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e+117], N[Not[LessEqual[N[(z - t), $MachinePrecision], 2e+34]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+117} \lor \neg \left(z - t \leq 2 \cdot 10^{+34}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999983e117 or 1.99999999999999989e34 < (-.f64 z t) Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 68.4%
if -4.99999999999999983e117 < (-.f64 z t) < 1.99999999999999989e34Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 82.3%
Taylor expanded in z around 0 48.4%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e-21) (not (<= a 2.7e-71))) (* a 120.0) (* 60.0 (/ y (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e-21) || !(a <= 2.7e-71)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - 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.8d-21)) .or. (.not. (a <= 2.7d-71))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / (t - 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.8e-21) || !(a <= 2.7e-71)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e-21) or not (a <= 2.7e-71): tmp = a * 120.0 else: tmp = 60.0 * (y / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e-21) || !(a <= 2.7e-71)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.8e-21) || ~((a <= 2.7e-71))) tmp = a * 120.0; else tmp = 60.0 * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e-21], N[Not[LessEqual[a, 2.7e-71]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-21} \lor \neg \left(a \leq 2.7 \cdot 10^{-71}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if a < -3.7999999999999998e-21 or 2.7000000000000001e-71 < a Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 69.9%
if -3.7999999999999998e-21 < a < 2.7000000000000001e-71Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 49.7%
Final simplification61.2%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (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 = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.6e+145) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.6e+145) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
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 <= (-2.6d+145)) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.6e+145) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.6e+145: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.6e+145) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.6e+145) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.6e+145], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+145}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -2.60000000000000003e145Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 61.8%
Taylor expanded in z around inf 48.4%
if -2.60000000000000003e145 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 51.9%
Final simplification51.4%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 48.4%
Final simplification48.4%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))