
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- t x) (- y z)) (- a z)))))
(if (<= t_1 (- INFINITY))
(+ x (* (- y z) (/ (- t x) (- a z))))
(if (or (<= t_1 -2e-284) (and (not (<= t_1 0.0)) (<= t_1 5e+298)))
t_1
(+ t (* (- t x) (/ (- a y) z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if ((t_1 <= -2e-284) || (!(t_1 <= 0.0) && (t_1 <= 5e+298))) {
tmp = t_1;
} else {
tmp = t + ((t - x) * ((a - y) / z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if ((t_1 <= -2e-284) || (!(t_1 <= 0.0) && (t_1 <= 5e+298))) {
tmp = t_1;
} else {
tmp = t + ((t - x) * ((a - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - x) * (y - z)) / (a - z)) tmp = 0 if t_1 <= -math.inf: tmp = x + ((y - z) * ((t - x) / (a - z))) elif (t_1 <= -2e-284) or (not (t_1 <= 0.0) and (t_1 <= 5e+298)): tmp = t_1 else: tmp = t + ((t - x) * ((a - y) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - x) * Float64(y - z)) / Float64(a - z))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); elseif ((t_1 <= -2e-284) || (!(t_1 <= 0.0) && (t_1 <= 5e+298))) tmp = t_1; else tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - x) * (y - z)) / (a - z)); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((y - z) * ((t - x) / (a - z))); elseif ((t_1 <= -2e-284) || (~((t_1 <= 0.0)) && (t_1 <= 5e+298))) tmp = t_1; else tmp = t + ((t - x) * ((a - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -2e-284], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 5e+298]]], t$95$1, N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-284} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0Initial program 33.5%
associate-/l*82.4%
Simplified82.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000007e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e298Initial program 99.1%
if -2.00000000000000007e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0 or 5.0000000000000003e298 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 27.0%
associate-/l*49.5%
Simplified49.5%
Taylor expanded in y around 0 30.8%
mul-1-neg30.8%
associate-/l*48.1%
distribute-lft-neg-out48.1%
+-commutative48.1%
div-sub48.1%
distribute-rgt-out49.5%
sub-neg49.5%
associate-/r/49.5%
Simplified49.5%
Taylor expanded in z around -inf 60.4%
mul-1-neg60.4%
distribute-rgt-out--60.5%
associate-*r/81.8%
distribute-rgt-neg-in81.8%
mul-1-neg81.8%
associate-*r/81.8%
neg-mul-181.8%
Simplified81.8%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.75e+144) (not (<= z 9.8e+156))) (+ t (* (- t x) (/ (- a y) z))) (fma (- t x) (/ (- y z) (- a z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.75e+144) || !(z <= 9.8e+156)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = fma((t - x), ((y - z) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.75e+144) || !(z <= 9.8e+156)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.75e+144], N[Not[LessEqual[z, 9.8e+156]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+144} \lor \neg \left(z \leq 9.8 \cdot 10^{+156}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\end{array}
\end{array}
if z < -1.7499999999999999e144 or 9.79999999999999938e156 < z Initial program 20.9%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in y around 0 22.2%
mul-1-neg22.2%
associate-/l*53.4%
distribute-lft-neg-out53.4%
+-commutative53.4%
div-sub53.4%
distribute-rgt-out53.4%
sub-neg53.4%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in z around -inf 63.0%
mul-1-neg63.0%
distribute-rgt-out--63.1%
associate-*r/91.5%
distribute-rgt-neg-in91.5%
mul-1-neg91.5%
associate-*r/91.5%
neg-mul-191.5%
Simplified91.5%
if -1.7499999999999999e144 < z < 9.79999999999999938e156Initial program 82.4%
+-commutative82.4%
*-commutative82.4%
associate-/l*89.2%
fma-define89.2%
Simplified89.2%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.1e+144) (not (<= z 1.45e+163))) (+ t (* (- t x) (/ (- a y) z))) (+ x (/ (- t x) (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.1e+144) || !(z <= 1.45e+163)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-5.1d+144)) .or. (.not. (z <= 1.45d+163))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.1e+144) || !(z <= 1.45e+163)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.1e+144) or not (z <= 1.45e+163): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.1e+144) || !(z <= 1.45e+163)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.1e+144) || ~((z <= 1.45e+163))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.1e+144], N[Not[LessEqual[z, 1.45e+163]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+144} \lor \neg \left(z \leq 1.45 \cdot 10^{+163}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -5.0999999999999999e144 or 1.44999999999999999e163 < z Initial program 20.9%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in y around 0 22.2%
mul-1-neg22.2%
associate-/l*53.4%
distribute-lft-neg-out53.4%
+-commutative53.4%
div-sub53.4%
distribute-rgt-out53.4%
sub-neg53.4%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in z around -inf 63.0%
mul-1-neg63.0%
distribute-rgt-out--63.1%
associate-*r/91.5%
distribute-rgt-neg-in91.5%
mul-1-neg91.5%
associate-*r/91.5%
neg-mul-191.5%
Simplified91.5%
if -5.0999999999999999e144 < z < 1.44999999999999999e163Initial program 82.4%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in y around 0 81.0%
mul-1-neg81.0%
associate-/l*83.3%
distribute-lft-neg-out83.3%
+-commutative83.3%
div-sub83.3%
distribute-rgt-out85.0%
sub-neg85.0%
associate-/r/88.7%
Simplified88.7%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+122) (not (<= z 1.75e+155))) (+ t (* (- t x) (/ (- a y) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+122) || !(z <= 1.75e+155)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (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 ((z <= (-1.45d+122)) .or. (.not. (z <= 1.75d+155))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) * ((t - x) / (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 ((z <= -1.45e+122) || !(z <= 1.75e+155)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+122) or not (z <= 1.75e+155): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+122) || !(z <= 1.75e+155)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+122) || ~((z <= 1.75e+155))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+122], N[Not[LessEqual[z, 1.75e+155]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+122} \lor \neg \left(z \leq 1.75 \cdot 10^{+155}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -1.45e122 or 1.74999999999999992e155 < z Initial program 22.6%
associate-/l*53.2%
Simplified53.2%
Taylor expanded in y around 0 22.5%
mul-1-neg22.5%
associate-/l*53.2%
distribute-lft-neg-out53.2%
+-commutative53.2%
div-sub53.2%
distribute-rgt-out53.2%
sub-neg53.2%
associate-/r/58.7%
Simplified58.7%
Taylor expanded in z around -inf 62.4%
mul-1-neg62.4%
distribute-rgt-out--62.5%
associate-*r/89.2%
distribute-rgt-neg-in89.2%
mul-1-neg89.2%
associate-*r/89.2%
neg-mul-189.2%
Simplified89.2%
if -1.45e122 < z < 1.74999999999999992e155Initial program 83.1%
associate-/l*85.7%
Simplified85.7%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+129) (not (<= z 67000000.0))) (+ t (* (- t x) (/ (- a y) z))) (+ x (/ (* (- t x) y) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+129) || !(z <= 67000000.0)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + (((t - 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 ((z <= (-1.45d+129)) .or. (.not. (z <= 67000000.0d0))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + (((t - 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 ((z <= -1.45e+129) || !(z <= 67000000.0)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + (((t - x) * y) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+129) or not (z <= 67000000.0): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + (((t - x) * y) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+129) || !(z <= 67000000.0)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(Float64(t - x) * y) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+129) || ~((z <= 67000000.0))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + (((t - x) * y) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+129], N[Not[LessEqual[z, 67000000.0]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+129} \lor \neg \left(z \leq 67000000\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(t - x\right) \cdot y}{a - z}\\
\end{array}
\end{array}
if z < -1.45000000000000001e129 or 6.7e7 < z Initial program 36.1%
associate-/l*61.4%
Simplified61.4%
Taylor expanded in y around 0 38.8%
mul-1-neg38.8%
associate-/l*61.4%
distribute-lft-neg-out61.4%
+-commutative61.4%
div-sub61.4%
distribute-rgt-out61.4%
sub-neg61.4%
associate-/r/64.3%
Simplified64.3%
Taylor expanded in z around -inf 61.6%
mul-1-neg61.6%
distribute-rgt-out--61.7%
associate-*r/81.7%
distribute-rgt-neg-in81.7%
mul-1-neg81.7%
associate-*r/81.7%
neg-mul-181.7%
Simplified81.7%
if -1.45000000000000001e129 < z < 6.7e7Initial program 85.7%
Taylor expanded in y around inf 77.0%
*-commutative77.0%
Simplified77.0%
Final simplification78.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.4e+126) (not (<= y 2.25e+142))) (* y (* (- t x) (/ -1.0 (- z a)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.4e+126) || !(y <= 2.25e+142)) {
tmp = y * ((t - x) * (-1.0 / (z - a)));
} else {
tmp = x + (t * ((y - z) / (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 ((y <= (-9.4d+126)) .or. (.not. (y <= 2.25d+142))) then
tmp = y * ((t - x) * ((-1.0d0) / (z - a)))
else
tmp = x + (t * ((y - z) / (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 ((y <= -9.4e+126) || !(y <= 2.25e+142)) {
tmp = y * ((t - x) * (-1.0 / (z - a)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.4e+126) or not (y <= 2.25e+142): tmp = y * ((t - x) * (-1.0 / (z - a))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.4e+126) || !(y <= 2.25e+142)) tmp = Float64(y * Float64(Float64(t - x) * Float64(-1.0 / Float64(z - a)))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.4e+126) || ~((y <= 2.25e+142))) tmp = y * ((t - x) * (-1.0 / (z - a))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.4e+126], N[Not[LessEqual[y, 2.25e+142]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] * N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{+126} \lor \neg \left(y \leq 2.25 \cdot 10^{+142}\right):\\
\;\;\;\;y \cdot \left(\left(t - x\right) \cdot \frac{-1}{z - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -9.3999999999999997e126 or 2.2499999999999999e142 < y Initial program 72.9%
+-commutative72.9%
*-commutative72.9%
associate-/l*91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in y around inf 79.7%
sub-div79.7%
clear-num78.5%
Applied egg-rr78.5%
associate-/r/79.6%
Simplified79.6%
if -9.3999999999999997e126 < y < 2.2499999999999999e142Initial program 63.9%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in t around inf 59.2%
associate-/l*69.6%
Simplified69.6%
Final simplification72.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.6e-134)
(+ x (* t (/ (- y z) (- a z))))
(if (<= a 2.7e-23)
(- t (/ (* (- t x) (- y a)) z))
(- x (* y (/ (- t x) (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.6e-134) {
tmp = x + (t * ((y - z) / (a - z)));
} else if (a <= 2.7e-23) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x - (y * ((t - x) / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-7.6d-134)) then
tmp = x + (t * ((y - z) / (a - z)))
else if (a <= 2.7d-23) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = x - (y * ((t - x) / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.6e-134) {
tmp = x + (t * ((y - z) / (a - z)));
} else if (a <= 2.7e-23) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x - (y * ((t - x) / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.6e-134: tmp = x + (t * ((y - z) / (a - z))) elif a <= 2.7e-23: tmp = t - (((t - x) * (y - a)) / z) else: tmp = x - (y * ((t - x) / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.6e-134) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); elseif (a <= 2.7e-23) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x - Float64(y * Float64(Float64(t - x) / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.6e-134) tmp = x + (t * ((y - z) / (a - z))); elseif (a <= 2.7e-23) tmp = t - (((t - x) * (y - a)) / z); else tmp = x - (y * ((t - x) / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.6e-134], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-23], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-134}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-23}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - x}{z - a}\\
\end{array}
\end{array}
if a < -7.60000000000000006e-134Initial program 69.2%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in t around inf 63.1%
associate-/l*72.7%
Simplified72.7%
if -7.60000000000000006e-134 < a < 2.69999999999999985e-23Initial program 56.7%
+-commutative56.7%
*-commutative56.7%
associate-/l*70.5%
fma-define70.5%
Simplified70.5%
Taylor expanded in z around inf 81.1%
associate--l+81.1%
associate-*r/81.1%
associate-*r/81.1%
mul-1-neg81.1%
div-sub81.1%
mul-1-neg81.1%
distribute-lft-out--81.1%
associate-*r/81.1%
mul-1-neg81.1%
unsub-neg81.1%
distribute-rgt-out--81.1%
Simplified81.1%
if 2.69999999999999985e-23 < a Initial program 74.6%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in y around inf 68.0%
associate-*r/72.5%
Simplified72.5%
Final simplification75.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.8e+67)
(- x (* y (/ (- t x) (- z a))))
(if (<= y 3.4e+140)
(+ x (* t (/ (- y z) (- a z))))
(* y (* (- t x) (/ -1.0 (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+67) {
tmp = x - (y * ((t - x) / (z - a)));
} else if (y <= 3.4e+140) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = y * ((t - x) * (-1.0 / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.8d+67)) then
tmp = x - (y * ((t - x) / (z - a)))
else if (y <= 3.4d+140) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = y * ((t - x) * ((-1.0d0) / (z - a)))
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.8e+67) {
tmp = x - (y * ((t - x) / (z - a)));
} else if (y <= 3.4e+140) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = y * ((t - x) * (-1.0 / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.8e+67: tmp = x - (y * ((t - x) / (z - a))) elif y <= 3.4e+140: tmp = x + (t * ((y - z) / (a - z))) else: tmp = y * ((t - x) * (-1.0 / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.8e+67) tmp = Float64(x - Float64(y * Float64(Float64(t - x) / Float64(z - a)))); elseif (y <= 3.4e+140) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(y * Float64(Float64(t - x) * Float64(-1.0 / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.8e+67) tmp = x - (y * ((t - x) / (z - a))); elseif (y <= 3.4e+140) tmp = x + (t * ((y - z) / (a - z))); else tmp = y * ((t - x) * (-1.0 / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.8e+67], N[(x - N[(y * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+140], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] * N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+67}:\\
\;\;\;\;x - y \cdot \frac{t - x}{z - a}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(t - x\right) \cdot \frac{-1}{z - a}\right)\\
\end{array}
\end{array}
if y < -2.7999999999999998e67Initial program 71.5%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in y around inf 69.7%
associate-*r/88.4%
Simplified88.4%
if -2.7999999999999998e67 < y < 3.4e140Initial program 62.6%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in t around inf 58.6%
associate-/l*68.6%
Simplified68.6%
if 3.4e140 < y Initial program 78.4%
+-commutative78.4%
*-commutative78.4%
associate-/l*86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in y around inf 80.7%
sub-div80.7%
clear-num78.7%
Applied egg-rr78.7%
associate-/r/80.6%
Simplified80.6%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.75e+111) (not (<= a 6.5e+16))) (+ x (* y (/ (- t x) a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.75e+111) || !(a <= 6.5e+16)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((y - z) / (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 <= (-2.75d+111)) .or. (.not. (a <= 6.5d+16))) then
tmp = x + (y * ((t - x) / a))
else
tmp = t * ((y - z) / (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 <= -2.75e+111) || !(a <= 6.5e+16)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.75e+111) or not (a <= 6.5e+16): tmp = x + (y * ((t - x) / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.75e+111) || !(a <= 6.5e+16)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.75e+111) || ~((a <= 6.5e+16))) tmp = x + (y * ((t - x) / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.75e+111], N[Not[LessEqual[a, 6.5e+16]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{+111} \lor \neg \left(a \leq 6.5 \cdot 10^{+16}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -2.7499999999999999e111 or 6.5e16 < a Initial program 72.8%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in z around 0 67.6%
associate-/l*72.8%
Simplified72.8%
if -2.7499999999999999e111 < a < 6.5e16Initial program 61.7%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in y around 0 57.2%
mul-1-neg57.2%
associate-/l*69.5%
distribute-lft-neg-out69.5%
+-commutative69.5%
div-sub69.5%
distribute-rgt-out71.6%
sub-neg71.6%
associate-/r/75.5%
Simplified75.5%
+-commutative75.5%
add-cube-cbrt74.5%
fma-define74.5%
pow274.5%
Applied egg-rr74.5%
Taylor expanded in t around inf 66.4%
div-sub66.4%
Simplified66.4%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e+108) (not (<= a 1.16e+26))) (+ x (* t (/ y (- a z)))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e+108) || !(a <= 1.16e+26)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t * ((y - z) / (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 <= (-7.5d+108)) .or. (.not. (a <= 1.16d+26))) then
tmp = x + (t * (y / (a - z)))
else
tmp = t * ((y - z) / (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 <= -7.5e+108) || !(a <= 1.16e+26)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e+108) or not (a <= 1.16e+26): tmp = x + (t * (y / (a - z))) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e+108) || !(a <= 1.16e+26)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.5e+108) || ~((a <= 1.16e+26))) tmp = x + (t * (y / (a - z))); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e+108], N[Not[LessEqual[a, 1.16e+26]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+108} \lor \neg \left(a \leq 1.16 \cdot 10^{+26}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -7.50000000000000039e108 or 1.15999999999999996e26 < a Initial program 73.2%
Taylor expanded in y around inf 70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in t around inf 63.9%
associate-/l*66.6%
Simplified66.6%
if -7.50000000000000039e108 < a < 1.15999999999999996e26Initial program 61.6%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in y around 0 57.1%
mul-1-neg57.1%
associate-/l*69.9%
distribute-lft-neg-out69.9%
+-commutative69.9%
div-sub69.9%
distribute-rgt-out72.0%
sub-neg72.0%
associate-/r/75.8%
Simplified75.8%
+-commutative75.8%
add-cube-cbrt74.8%
fma-define74.8%
pow274.8%
Applied egg-rr74.8%
Taylor expanded in t around inf 66.2%
div-sub66.1%
Simplified66.1%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.7e+108) (* x (- (- -1.0) (/ y a))) (if (<= a 1.7e+26) (* t (/ (- y z) (- a z))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+108) {
tmp = x * (-(-1.0) - (y / a));
} else if (a <= 1.7e+26) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+108)) then
tmp = x * (-(-1.0d0) - (y / a))
else if (a <= 1.7d+26) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+108) {
tmp = x * (-(-1.0) - (y / a));
} else if (a <= 1.7e+26) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+108: tmp = x * (-(-1.0) - (y / a)) elif a <= 1.7e+26: tmp = t * ((y - z) / (a - z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+108) tmp = Float64(x * Float64(Float64(-(-1.0)) - Float64(y / a))); elseif (a <= 1.7e+26) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+108) tmp = x * (-(-1.0) - (y / a)); elseif (a <= 1.7e+26) tmp = t * ((y - z) / (a - z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+108], N[(x * N[((--1.0) - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+26], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \left(\left(--1\right) - \frac{y}{a}\right)\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+26}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -3.6999999999999998e108Initial program 67.9%
+-commutative67.9%
*-commutative67.9%
associate-/l*86.8%
fma-define86.8%
Simplified86.8%
Taylor expanded in x around -inf 71.8%
Taylor expanded in z around 0 68.4%
associate-*r*68.4%
mul-1-neg68.4%
sub-neg68.4%
metadata-eval68.4%
Simplified68.4%
if -3.6999999999999998e108 < a < 1.7000000000000001e26Initial program 61.6%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in y around 0 57.1%
mul-1-neg57.1%
associate-/l*69.9%
distribute-lft-neg-out69.9%
+-commutative69.9%
div-sub69.9%
distribute-rgt-out72.0%
sub-neg72.0%
associate-/r/75.8%
Simplified75.8%
+-commutative75.8%
add-cube-cbrt74.8%
fma-define74.8%
pow274.8%
Applied egg-rr74.8%
Taylor expanded in t around inf 66.2%
div-sub66.1%
Simplified66.1%
if 1.7000000000000001e26 < a Initial program 77.3%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in t around inf 72.9%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in z around 0 61.7%
associate-/l*63.1%
Simplified63.1%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+125) t (if (<= z 200000000000.0) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+125) {
tmp = t;
} else if (z <= 200000000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = 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 <= (-3.5d+125)) then
tmp = t
else if (z <= 200000000000.0d0) then
tmp = x + (t * (y / a))
else
tmp = 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 <= -3.5e+125) {
tmp = t;
} else if (z <= 200000000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+125: tmp = t elif z <= 200000000000.0: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+125) tmp = t; elseif (z <= 200000000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+125) tmp = t; elseif (z <= 200000000000.0) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+125], t, If[LessEqual[z, 200000000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+125}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 200000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.50000000000000011e125 or 2e11 < z Initial program 36.1%
associate-/l*61.4%
Simplified61.4%
Taylor expanded in y around 0 38.8%
mul-1-neg38.8%
associate-/l*61.4%
distribute-lft-neg-out61.4%
+-commutative61.4%
div-sub61.4%
distribute-rgt-out61.4%
sub-neg61.4%
associate-/r/64.3%
Simplified64.3%
Taylor expanded in z around inf 52.2%
if -3.50000000000000011e125 < z < 2e11Initial program 85.7%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in t around inf 69.3%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in z around 0 57.6%
associate-/l*59.3%
Simplified59.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.8e+108) x (if (<= a -1.85e-144) (* y (/ t (- a z))) (if (<= a 1.35e+26) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.8e+108) {
tmp = x;
} else if (a <= -1.85e-144) {
tmp = y * (t / (a - z));
} else if (a <= 1.35e+26) {
tmp = t;
} 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 (a <= (-1.8d+108)) then
tmp = x
else if (a <= (-1.85d-144)) then
tmp = y * (t / (a - z))
else if (a <= 1.35d+26) then
tmp = t
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 (a <= -1.8e+108) {
tmp = x;
} else if (a <= -1.85e-144) {
tmp = y * (t / (a - z));
} else if (a <= 1.35e+26) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.8e+108: tmp = x elif a <= -1.85e-144: tmp = y * (t / (a - z)) elif a <= 1.35e+26: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.8e+108) tmp = x; elseif (a <= -1.85e-144) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (a <= 1.35e+26) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.8e+108) tmp = x; elseif (a <= -1.85e-144) tmp = y * (t / (a - z)); elseif (a <= 1.35e+26) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e+108], x, If[LessEqual[a, -1.85e-144], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+26], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-144}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+26}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.8e108 or 1.35e26 < a Initial program 73.2%
+-commutative73.2%
*-commutative73.2%
associate-/l*88.4%
fma-define88.4%
Simplified88.4%
Taylor expanded in a around inf 53.9%
if -1.8e108 < a < -1.8500000000000001e-144Initial program 70.8%
+-commutative70.8%
*-commutative70.8%
associate-/l*84.3%
fma-define84.4%
Simplified84.4%
Taylor expanded in y around inf 50.0%
Taylor expanded in t around inf 40.1%
if -1.8500000000000001e-144 < a < 1.35e26Initial program 56.2%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in y around 0 50.3%
mul-1-neg50.3%
associate-/l*65.7%
distribute-lft-neg-out65.7%
+-commutative65.7%
div-sub65.7%
distribute-rgt-out67.0%
sub-neg67.0%
associate-/r/70.9%
Simplified70.9%
Taylor expanded in z around inf 42.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+108) x (if (<= a -2.1e-211) (/ (* t y) a) (if (<= a 1.85e+26) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+108) {
tmp = x;
} else if (a <= -2.1e-211) {
tmp = (t * y) / a;
} else if (a <= 1.85e+26) {
tmp = t;
} 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 (a <= (-1.7d+108)) then
tmp = x
else if (a <= (-2.1d-211)) then
tmp = (t * y) / a
else if (a <= 1.85d+26) then
tmp = t
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 (a <= -1.7e+108) {
tmp = x;
} else if (a <= -2.1e-211) {
tmp = (t * y) / a;
} else if (a <= 1.85e+26) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+108: tmp = x elif a <= -2.1e-211: tmp = (t * y) / a elif a <= 1.85e+26: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+108) tmp = x; elseif (a <= -2.1e-211) tmp = Float64(Float64(t * y) / a); elseif (a <= 1.85e+26) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+108) tmp = x; elseif (a <= -2.1e-211) tmp = (t * y) / a; elseif (a <= 1.85e+26) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+108], x, If[LessEqual[a, -2.1e-211], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1.85e+26], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-211}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+26}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.69999999999999998e108 or 1.84999999999999994e26 < a Initial program 73.2%
+-commutative73.2%
*-commutative73.2%
associate-/l*88.4%
fma-define88.4%
Simplified88.4%
Taylor expanded in a around inf 53.9%
if -1.69999999999999998e108 < a < -2.10000000000000008e-211Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
associate-/l*83.4%
fma-define83.5%
Simplified83.5%
Taylor expanded in y around inf 49.4%
Taylor expanded in a around inf 35.7%
Taylor expanded in t around inf 33.6%
if -2.10000000000000008e-211 < a < 1.84999999999999994e26Initial program 55.0%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around 0 50.8%
mul-1-neg50.8%
associate-/l*66.7%
distribute-lft-neg-out66.7%
+-commutative66.7%
div-sub66.7%
distribute-rgt-out68.1%
sub-neg68.1%
associate-/r/70.2%
Simplified70.2%
Taylor expanded in z around inf 43.8%
Final simplification45.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.6e+106) x (if (<= a 1.5e+26) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e+106) {
tmp = x;
} else if (a <= 1.5e+26) {
tmp = t;
} 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 (a <= (-2.6d+106)) then
tmp = x
else if (a <= 1.5d+26) then
tmp = t
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 (a <= -2.6e+106) {
tmp = x;
} else if (a <= 1.5e+26) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.6e+106: tmp = x elif a <= 1.5e+26: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.6e+106) tmp = x; elseif (a <= 1.5e+26) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.6e+106) tmp = x; elseif (a <= 1.5e+26) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e+106], x, If[LessEqual[a, 1.5e+26], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{+106}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+26}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.6000000000000002e106 or 1.49999999999999999e26 < a Initial program 73.5%
+-commutative73.5%
*-commutative73.5%
associate-/l*88.6%
fma-define88.6%
Simplified88.6%
Taylor expanded in a around inf 53.4%
if -2.6000000000000002e106 < a < 1.49999999999999999e26Initial program 61.3%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in y around 0 56.9%
mul-1-neg56.9%
associate-/l*69.8%
distribute-lft-neg-out69.8%
+-commutative69.8%
div-sub69.8%
distribute-rgt-out72.0%
sub-neg72.0%
associate-/r/75.6%
Simplified75.6%
Taylor expanded in z around inf 36.5%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 66.3%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in y around 0 65.6%
mul-1-neg65.6%
associate-/l*75.4%
distribute-lft-neg-out75.4%
+-commutative75.4%
div-sub75.4%
distribute-rgt-out76.7%
sub-neg76.7%
associate-/r/80.6%
Simplified80.6%
Taylor expanded in z around inf 25.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 66.3%
+-commutative66.3%
*-commutative66.3%
associate-/l*81.0%
fma-define81.0%
Simplified81.0%
Taylor expanded in x around -inf 46.5%
Taylor expanded in y around 0 25.9%
+-commutative25.9%
Simplified25.9%
distribute-rgt-in25.9%
*-un-lft-identity25.9%
Applied egg-rr25.9%
Taylor expanded in z around inf 2.8%
distribute-rgt1-in2.8%
metadata-eval2.8%
mul0-lft2.8%
Simplified2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024141
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))