
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- x y) (- t z)) (- a t)))))
(if (or (<= t_1 -5e-237) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(+ y (/ (* (- y x) (- a z)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y + (((y - x) * (a - z)) / t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-237], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-237} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000002e-237 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.2%
+-commutative71.2%
associate-/l*91.0%
fma-define91.0%
Simplified91.0%
if -5.0000000000000002e-237 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 10.0%
+-commutative10.0%
associate-/l*10.0%
fma-define10.0%
Simplified10.0%
Taylor expanded in t around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- x y) (- t z)) (- a t)))))
(if (or (<= t_1 -5e-237) (not (<= t_1 0.0)))
(+ x (* (- x y) (/ (- z t) (- t a))))
(+ y (/ (* (- y x) (- a z)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) {
tmp = x + ((x - y) * ((z - t) / (t - a)));
} else {
tmp = y + (((y - x) * (a - 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) :: t_1
real(8) :: tmp
t_1 = x + (((x - y) * (t - z)) / (a - t))
if ((t_1 <= (-5d-237)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((x - y) * ((z - t) / (t - a)))
else
tmp = y + (((y - x) * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) {
tmp = x + ((x - y) * ((z - t) / (t - a)));
} else {
tmp = y + (((y - x) * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((x - y) * (t - z)) / (a - t)) tmp = 0 if (t_1 <= -5e-237) or not (t_1 <= 0.0): tmp = x + ((x - y) * ((z - t) / (t - a))) else: tmp = y + (((y - x) * (a - z)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(x - y) * Float64(Float64(z - t) / Float64(t - a)))); else tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((x - y) * (t - z)) / (a - t)); tmp = 0.0; if ((t_1 <= -5e-237) || ~((t_1 <= 0.0))) tmp = x + ((x - y) * ((z - t) / (t - a))); else tmp = y + (((y - x) * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-237], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - y), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-237} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{z - t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000002e-237 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.2%
associate-/l*91.0%
*-commutative91.0%
Applied egg-rr91.0%
if -5.0000000000000002e-237 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 10.0%
+-commutative10.0%
associate-/l*10.0%
fma-define10.0%
Simplified10.0%
Taylor expanded in t around inf 100.0%
associate--l+100.0%
associate-*r/100.0%
associate-*r/100.0%
mul-1-neg100.0%
div-sub100.0%
mul-1-neg100.0%
distribute-lft-out--100.0%
associate-*r/100.0%
mul-1-neg100.0%
unsub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.55e+198)
y
(if (or (<= t -4.2e-173) (not (<= t 9e-134)))
(+ x (* y (/ (- z t) (- a t))))
(+ x (* (- x y) (/ z (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+198) {
tmp = y;
} else if ((t <= -4.2e-173) || !(t <= 9e-134)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + ((x - y) * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.55d+198)) then
tmp = y
else if ((t <= (-4.2d-173)) .or. (.not. (t <= 9d-134))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = x + ((x - y) * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+198) {
tmp = y;
} else if ((t <= -4.2e-173) || !(t <= 9e-134)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + ((x - y) * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+198: tmp = y elif (t <= -4.2e-173) or not (t <= 9e-134): tmp = x + (y * ((z - t) / (a - t))) else: tmp = x + ((x - y) * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+198) tmp = y; elseif ((t <= -4.2e-173) || !(t <= 9e-134)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(x - y) * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+198) tmp = y; elseif ((t <= -4.2e-173) || ~((t <= 9e-134))) tmp = x + (y * ((z - t) / (a - t))); else tmp = x + ((x - y) * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+198], y, If[Or[LessEqual[t, -4.2e-173], N[Not[LessEqual[t, 9e-134]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+198}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-173} \lor \neg \left(t \leq 9 \cdot 10^{-134}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -1.54999999999999987e198Initial program 20.3%
associate-/l*58.5%
*-commutative58.5%
Applied egg-rr58.5%
Taylor expanded in t around inf 67.9%
if -1.54999999999999987e198 < t < -4.20000000000000003e-173 or 9.000000000000001e-134 < t Initial program 63.9%
associate-/l*84.8%
*-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in y around inf 77.3%
if -4.20000000000000003e-173 < t < 9.000000000000001e-134Initial program 92.8%
associate-/l*98.4%
*-commutative98.4%
Applied egg-rr98.4%
Taylor expanded in z around inf 97.0%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.8e+192)
y
(if (or (<= t -2.4e+21) (not (<= t 4.4e+106)))
(+ x (* y (/ t (- t a))))
(+ x (* (- x y) (/ z (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e+192) {
tmp = y;
} else if ((t <= -2.4e+21) || !(t <= 4.4e+106)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + ((x - y) * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6.8d+192)) then
tmp = y
else if ((t <= (-2.4d+21)) .or. (.not. (t <= 4.4d+106))) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + ((x - y) * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e+192) {
tmp = y;
} else if ((t <= -2.4e+21) || !(t <= 4.4e+106)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + ((x - y) * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.8e+192: tmp = y elif (t <= -2.4e+21) or not (t <= 4.4e+106): tmp = x + (y * (t / (t - a))) else: tmp = x + ((x - y) * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.8e+192) tmp = y; elseif ((t <= -2.4e+21) || !(t <= 4.4e+106)) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(Float64(x - y) * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.8e+192) tmp = y; elseif ((t <= -2.4e+21) || ~((t <= 4.4e+106))) tmp = x + (y * (t / (t - a))); else tmp = x + ((x - y) * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.8e+192], y, If[Or[LessEqual[t, -2.4e+21], N[Not[LessEqual[t, 4.4e+106]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+192}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+21} \lor \neg \left(t \leq 4.4 \cdot 10^{+106}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -6.79999999999999992e192Initial program 20.3%
associate-/l*58.5%
*-commutative58.5%
Applied egg-rr58.5%
Taylor expanded in t around inf 67.9%
if -6.79999999999999992e192 < t < -2.4e21 or 4.39999999999999983e106 < t Initial program 46.5%
associate-/l*76.8%
*-commutative76.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 71.9%
Taylor expanded in z around 0 65.0%
neg-mul-165.0%
Simplified65.0%
if -2.4e21 < t < 4.39999999999999983e106Initial program 84.3%
associate-/l*94.3%
*-commutative94.3%
Applied egg-rr94.3%
Taylor expanded in z around inf 83.6%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.05e+196)
y
(if (or (<= t -7.5e+73) (not (<= t 2.05e+107)))
(+ x (* y (/ t (- t a))))
(+ x (* z (/ (- x y) (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+196) {
tmp = y;
} else if ((t <= -7.5e+73) || !(t <= 2.05e+107)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * ((x - y) / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.05d+196)) then
tmp = y
else if ((t <= (-7.5d+73)) .or. (.not. (t <= 2.05d+107))) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (z * ((x - y) / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+196) {
tmp = y;
} else if ((t <= -7.5e+73) || !(t <= 2.05e+107)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * ((x - y) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+196: tmp = y elif (t <= -7.5e+73) or not (t <= 2.05e+107): tmp = x + (y * (t / (t - a))) else: tmp = x + (z * ((x - y) / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+196) tmp = y; elseif ((t <= -7.5e+73) || !(t <= 2.05e+107)) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(Float64(x - y) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.05e+196) tmp = y; elseif ((t <= -7.5e+73) || ~((t <= 2.05e+107))) tmp = x + (y * (t / (t - a))); else tmp = x + (z * ((x - y) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+196], y, If[Or[LessEqual[t, -7.5e+73], N[Not[LessEqual[t, 2.05e+107]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+196}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{+73} \lor \neg \left(t \leq 2.05 \cdot 10^{+107}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{x - y}{t - a}\\
\end{array}
\end{array}
if t < -1.05000000000000007e196Initial program 20.3%
associate-/l*58.5%
*-commutative58.5%
Applied egg-rr58.5%
Taylor expanded in t around inf 67.9%
if -1.05000000000000007e196 < t < -7.5e73 or 2.05e107 < t Initial program 44.3%
associate-/l*77.0%
*-commutative77.0%
Applied egg-rr77.0%
Taylor expanded in y around inf 73.9%
Taylor expanded in z around 0 66.7%
neg-mul-166.7%
Simplified66.7%
if -7.5e73 < t < 2.05e107Initial program 83.4%
Taylor expanded in z around inf 73.6%
associate-/l*81.0%
Simplified81.0%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.15e+198)
y
(if (<= t -4.2e-173)
(+ x (* y (/ (- z t) (- a t))))
(if (<= t 4.6e-134)
(+ x (* (- x y) (/ z (- t a))))
(+ x (/ y (/ (- a t) (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.15e+198) {
tmp = y;
} else if (t <= -4.2e-173) {
tmp = x + (y * ((z - t) / (a - t)));
} else if (t <= 4.6e-134) {
tmp = x + ((x - y) * (z / (t - a)));
} else {
tmp = x + (y / ((a - t) / (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 (t <= (-1.15d+198)) then
tmp = y
else if (t <= (-4.2d-173)) then
tmp = x + (y * ((z - t) / (a - t)))
else if (t <= 4.6d-134) then
tmp = x + ((x - y) * (z / (t - a)))
else
tmp = x + (y / ((a - t) / (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 (t <= -1.15e+198) {
tmp = y;
} else if (t <= -4.2e-173) {
tmp = x + (y * ((z - t) / (a - t)));
} else if (t <= 4.6e-134) {
tmp = x + ((x - y) * (z / (t - a)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.15e+198: tmp = y elif t <= -4.2e-173: tmp = x + (y * ((z - t) / (a - t))) elif t <= 4.6e-134: tmp = x + ((x - y) * (z / (t - a))) else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.15e+198) tmp = y; elseif (t <= -4.2e-173) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); elseif (t <= 4.6e-134) tmp = Float64(x + Float64(Float64(x - y) * Float64(z / Float64(t - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.15e+198) tmp = y; elseif (t <= -4.2e-173) tmp = x + (y * ((z - t) / (a - t))); elseif (t <= 4.6e-134) tmp = x + ((x - y) * (z / (t - a))); else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.15e+198], y, If[LessEqual[t, -4.2e-173], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-134], N[(x + N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+198}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-173}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-134}:\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if t < -1.15e198Initial program 20.3%
associate-/l*58.5%
*-commutative58.5%
Applied egg-rr58.5%
Taylor expanded in t around inf 67.9%
if -1.15e198 < t < -4.20000000000000003e-173Initial program 73.7%
associate-/l*90.4%
*-commutative90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 77.6%
if -4.20000000000000003e-173 < t < 4.6000000000000001e-134Initial program 92.8%
associate-/l*98.4%
*-commutative98.4%
Applied egg-rr98.4%
Taylor expanded in z around inf 97.0%
if 4.6000000000000001e-134 < t Initial program 55.2%
associate-/l*79.8%
*-commutative79.8%
Applied egg-rr79.8%
Taylor expanded in y around inf 77.1%
*-un-lft-identity77.1%
associate-*l/77.0%
*-commutative77.0%
associate-*l/77.1%
*-un-lft-identity77.1%
clear-num77.0%
un-div-inv77.1%
Applied egg-rr77.1%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-158) (not (<= a 7.8e-115))) (+ x (* y (/ (- z t) (- a t)))) (+ y (/ (* (- y x) (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-158) || !(a <= 7.8e-115)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + (((y - x) * (a - z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.5d-158)) .or. (.not. (a <= 7.8d-115))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y + (((y - x) * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-158) || !(a <= 7.8e-115)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + (((y - x) * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-158) or not (a <= 7.8e-115): tmp = x + (y * ((z - t) / (a - t))) else: tmp = y + (((y - x) * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-158) || !(a <= 7.8e-115)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-158) || ~((a <= 7.8e-115))) tmp = x + (y * ((z - t) / (a - t))); else tmp = y + (((y - x) * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-158], N[Not[LessEqual[a, 7.8e-115]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-158} \lor \neg \left(a \leq 7.8 \cdot 10^{-115}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -5.50000000000000025e-158 or 7.7999999999999997e-115 < a Initial program 66.5%
associate-/l*88.3%
*-commutative88.3%
Applied egg-rr88.3%
Taylor expanded in y around inf 79.3%
if -5.50000000000000025e-158 < a < 7.7999999999999997e-115Initial program 70.0%
+-commutative70.0%
associate-/l*78.8%
fma-define78.8%
Simplified78.8%
Taylor expanded in t around inf 85.9%
associate--l+85.9%
associate-*r/85.9%
associate-*r/85.9%
mul-1-neg85.9%
div-sub85.9%
mul-1-neg85.9%
distribute-lft-out--85.9%
associate-*r/85.9%
mul-1-neg85.9%
unsub-neg85.9%
distribute-rgt-out--85.9%
Simplified85.9%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e+171) (not (<= a 1.3e-115))) (+ x (* (- y x) (/ z a))) (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+171) || !(a <= 1.3e-115)) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = (z - t) * (y / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.8d+171)) .or. (.not. (a <= 1.3d-115))) then
tmp = x + ((y - x) * (z / a))
else
tmp = (z - t) * (y / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+171) || !(a <= 1.3e-115)) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = (z - t) * (y / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e+171) or not (a <= 1.3e-115): tmp = x + ((y - x) * (z / a)) else: tmp = (z - t) * (y / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e+171) || !(a <= 1.3e-115)) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); else tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e+171) || ~((a <= 1.3e-115))) tmp = x + ((y - x) * (z / a)); else tmp = (z - t) * (y / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e+171], N[Not[LessEqual[a, 1.3e-115]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+171} \lor \neg \left(a \leq 1.3 \cdot 10^{-115}\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -1.80000000000000009e171 or 1.30000000000000002e-115 < a Initial program 68.1%
associate-/l*91.8%
*-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in t around 0 72.1%
if -1.80000000000000009e171 < a < 1.30000000000000002e-115Initial program 66.7%
+-commutative66.7%
associate-/l*79.9%
fma-define79.9%
Simplified79.9%
clear-num79.9%
associate-/r/79.8%
Applied egg-rr79.8%
Taylor expanded in y around inf 68.5%
div-sub68.5%
associate-*r/55.0%
*-commutative55.0%
associate-/l*61.9%
Simplified61.9%
Final simplification67.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e+173) (not (<= a 1.45e-115))) (- x (* z (/ (- x y) a))) (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e+173) || !(a <= 1.45e-115)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = (z - t) * (y / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.5d+173)) .or. (.not. (a <= 1.45d-115))) then
tmp = x - (z * ((x - y) / a))
else
tmp = (z - t) * (y / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e+173) || !(a <= 1.45e-115)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = (z - t) * (y / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e+173) or not (a <= 1.45e-115): tmp = x - (z * ((x - y) / a)) else: tmp = (z - t) * (y / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e+173) || !(a <= 1.45e-115)) tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); else tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.5e+173) || ~((a <= 1.45e-115))) tmp = x - (z * ((x - y) / a)); else tmp = (z - t) * (y / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e+173], N[Not[LessEqual[a, 1.45e-115]], $MachinePrecision]], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+173} \lor \neg \left(a \leq 1.45 \cdot 10^{-115}\right):\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -2.50000000000000017e173 or 1.4499999999999999e-115 < a Initial program 68.1%
Taylor expanded in t around 0 58.9%
associate-/l*71.4%
Simplified71.4%
if -2.50000000000000017e173 < a < 1.4499999999999999e-115Initial program 66.7%
+-commutative66.7%
associate-/l*79.9%
fma-define79.9%
Simplified79.9%
clear-num79.9%
associate-/r/79.8%
Applied egg-rr79.8%
Taylor expanded in y around inf 68.5%
div-sub68.5%
associate-*r/55.0%
*-commutative55.0%
associate-/l*61.9%
Simplified61.9%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.2e-87) (not (<= y 2.1e-116))) (* (- z t) (/ y (- a t))) (* x (- 1.0 (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.2e-87) || !(y <= 2.1e-116)) {
tmp = (z - t) * (y / (a - t));
} else {
tmp = 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 <= (-5.2d-87)) .or. (.not. (y <= 2.1d-116))) then
tmp = (z - t) * (y / (a - t))
else
tmp = 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 <= -5.2e-87) || !(y <= 2.1e-116)) {
tmp = (z - t) * (y / (a - t));
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.2e-87) or not (y <= 2.1e-116): tmp = (z - t) * (y / (a - t)) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.2e-87) || !(y <= 2.1e-116)) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); else tmp = Float64(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 <= -5.2e-87) || ~((y <= 2.1e-116))) tmp = (z - t) * (y / (a - t)); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.2e-87], N[Not[LessEqual[y, 2.1e-116]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-87} \lor \neg \left(y \leq 2.1 \cdot 10^{-116}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if y < -5.20000000000000005e-87 or 2.0999999999999999e-116 < y Initial program 66.1%
+-commutative66.1%
associate-/l*92.4%
fma-define92.5%
Simplified92.5%
clear-num92.4%
associate-/r/92.4%
Applied egg-rr92.4%
Taylor expanded in y around inf 71.1%
div-sub71.1%
associate-*r/50.6%
*-commutative50.6%
associate-/l*69.1%
Simplified69.1%
if -5.20000000000000005e-87 < y < 2.0999999999999999e-116Initial program 69.9%
+-commutative69.9%
associate-/l*73.7%
fma-define73.7%
Simplified73.7%
Taylor expanded in x around -inf 68.0%
associate-*r*68.0%
neg-mul-168.0%
+-commutative68.0%
Simplified68.0%
Taylor expanded in t around 0 53.1%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.6e+28) (+ x (* (- y x) (/ z a))) (if (<= z 7.5e+52) (+ x (* y (/ t (- t a)))) (- x (* z (/ (- x y) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+28) {
tmp = x + ((y - x) * (z / a));
} else if (z <= 7.5e+52) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x - (z * ((x - y) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.6d+28)) then
tmp = x + ((y - x) * (z / a))
else if (z <= 7.5d+52) then
tmp = x + (y * (t / (t - a)))
else
tmp = x - (z * ((x - y) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+28) {
tmp = x + ((y - x) * (z / a));
} else if (z <= 7.5e+52) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x - (z * ((x - y) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+28: tmp = x + ((y - x) * (z / a)) elif z <= 7.5e+52: tmp = x + (y * (t / (t - a))) else: tmp = x - (z * ((x - y) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+28) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); elseif (z <= 7.5e+52) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e+28) tmp = x + ((y - x) * (z / a)); elseif (z <= 7.5e+52) tmp = x + (y * (t / (t - a))); else tmp = x - (z * ((x - y) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+28], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+52], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\end{array}
\end{array}
if z < -3.5999999999999999e28Initial program 66.6%
associate-/l*94.6%
*-commutative94.6%
Applied egg-rr94.6%
Taylor expanded in t around 0 69.5%
if -3.5999999999999999e28 < z < 7.49999999999999995e52Initial program 65.5%
associate-/l*78.5%
*-commutative78.5%
Applied egg-rr78.5%
Taylor expanded in y around inf 73.0%
Taylor expanded in z around 0 65.8%
neg-mul-165.8%
Simplified65.8%
if 7.49999999999999995e52 < z Initial program 72.8%
Taylor expanded in t around 0 56.5%
associate-/l*75.2%
Simplified75.2%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.65e-108) (* (- z t) (/ y (- a t))) (if (<= t 2.3e+106) (+ x (* (- y x) (/ z a))) (- x (* y (/ (- z t) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e-108) {
tmp = (z - t) * (y / (a - t));
} else if (t <= 2.3e+106) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = x - (y * ((z - t) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.65d-108)) then
tmp = (z - t) * (y / (a - t))
else if (t <= 2.3d+106) then
tmp = x + ((y - x) * (z / a))
else
tmp = x - (y * ((z - t) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e-108) {
tmp = (z - t) * (y / (a - t));
} else if (t <= 2.3e+106) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = x - (y * ((z - t) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.65e-108: tmp = (z - t) * (y / (a - t)) elif t <= 2.3e+106: tmp = x + ((y - x) * (z / a)) else: tmp = x - (y * ((z - t) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.65e-108) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); elseif (t <= 2.3e+106) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); else tmp = Float64(x - Float64(y * Float64(Float64(z - t) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.65e-108) tmp = (z - t) * (y / (a - t)); elseif (t <= 2.3e+106) tmp = x + ((y - x) * (z / a)); else tmp = x - (y * ((z - t) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e-108], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+106], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-108}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+106}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z - t}{t}\\
\end{array}
\end{array}
if t < -1.6500000000000001e-108Initial program 56.6%
+-commutative56.6%
associate-/l*80.0%
fma-define80.0%
Simplified80.0%
clear-num80.0%
associate-/r/79.9%
Applied egg-rr79.9%
Taylor expanded in y around inf 63.0%
div-sub63.0%
associate-*r/44.0%
*-commutative44.0%
associate-/l*55.8%
Simplified55.8%
if -1.6500000000000001e-108 < t < 2.3000000000000002e106Initial program 84.5%
associate-/l*94.6%
*-commutative94.6%
Applied egg-rr94.6%
Taylor expanded in t around 0 77.2%
if 2.3000000000000002e106 < t Initial program 35.6%
associate-/l*70.9%
*-commutative70.9%
Applied egg-rr70.9%
Taylor expanded in y around inf 71.3%
Taylor expanded in a around 0 35.7%
mul-1-neg35.7%
unsub-neg35.7%
associate-/l*59.3%
Simplified59.3%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+173) (not (<= z 3.2e+111))) (* z (/ (- y x) a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+173) || !(z <= 3.2e+111)) {
tmp = z * ((y - x) / a);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.7d+173)) .or. (.not. (z <= 3.2d+111))) then
tmp = z * ((y - x) / a)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+173) || !(z <= 3.2e+111)) {
tmp = z * ((y - x) / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+173) or not (z <= 3.2e+111): tmp = z * ((y - x) / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+173) || !(z <= 3.2e+111)) tmp = Float64(z * Float64(Float64(y - x) / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.7e+173) || ~((z <= 3.2e+111))) tmp = z * ((y - x) / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+173], N[Not[LessEqual[z, 3.2e+111]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+173} \lor \neg \left(z \leq 3.2 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.70000000000000011e173 or 3.2000000000000001e111 < z Initial program 73.1%
+-commutative73.1%
associate-/l*98.2%
fma-define98.2%
Simplified98.2%
Taylor expanded in z around inf 80.6%
Taylor expanded in a around inf 68.2%
if -1.70000000000000011e173 < z < 3.2000000000000001e111Initial program 65.2%
associate-/l*81.3%
*-commutative81.3%
Applied egg-rr81.3%
Taylor expanded in y around inf 71.7%
Taylor expanded in t around inf 47.1%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.5e+172) (not (<= z 4.3e+111))) (* z (/ y (- a t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+172) || !(z <= 4.3e+111)) {
tmp = z * (y / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7.5d+172)) .or. (.not. (z <= 4.3d+111))) then
tmp = z * (y / (a - t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+172) || !(z <= 4.3e+111)) {
tmp = z * (y / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.5e+172) or not (z <= 4.3e+111): tmp = z * (y / (a - t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.5e+172) || !(z <= 4.3e+111)) tmp = Float64(z * Float64(y / Float64(a - t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.5e+172) || ~((z <= 4.3e+111))) tmp = z * (y / (a - t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e+172], N[Not[LessEqual[z, 4.3e+111]], $MachinePrecision]], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+172} \lor \neg \left(z \leq 4.3 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -7.4999999999999994e172 or 4.29999999999999993e111 < z Initial program 73.1%
+-commutative73.1%
associate-/l*98.2%
fma-define98.2%
Simplified98.2%
Taylor expanded in z around inf 80.6%
Taylor expanded in y around inf 58.6%
if -7.4999999999999994e172 < z < 4.29999999999999993e111Initial program 65.2%
associate-/l*81.3%
*-commutative81.3%
Applied egg-rr81.3%
Taylor expanded in y around inf 71.7%
Taylor expanded in t around inf 47.1%
Final simplification50.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.4e+56) y (if (<= t 1.5e+105) (+ x (/ y (/ a z))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+56) {
tmp = y;
} else if (t <= 1.5e+105) {
tmp = x + (y / (a / z));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.4d+56)) then
tmp = y
else if (t <= 1.5d+105) then
tmp = x + (y / (a / z))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+56) {
tmp = y;
} else if (t <= 1.5e+105) {
tmp = x + (y / (a / z));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.4e+56: tmp = y elif t <= 1.5e+105: tmp = x + (y / (a / z)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.4e+56) tmp = y; elseif (t <= 1.5e+105) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.4e+56) tmp = y; elseif (t <= 1.5e+105) tmp = x + (y / (a / z)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e+56], y, If[LessEqual[t, 1.5e+105], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+105}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.40000000000000013e56 or 1.5e105 < t Initial program 37.8%
associate-/l*71.9%
*-commutative71.9%
Applied egg-rr71.9%
Taylor expanded in t around inf 56.4%
if -2.40000000000000013e56 < t < 1.5e105Initial program 84.2%
associate-/l*93.9%
*-commutative93.9%
Applied egg-rr93.9%
Taylor expanded in y around inf 76.1%
*-un-lft-identity76.1%
associate-*l/76.0%
*-commutative76.0%
associate-*l/76.1%
*-un-lft-identity76.1%
clear-num76.0%
un-div-inv76.1%
Applied egg-rr76.1%
Taylor expanded in t around 0 62.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.4e+56) y (if (<= t 3e+108) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+56) {
tmp = y;
} else if (t <= 3e+108) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.4d+56)) then
tmp = y
else if (t <= 3d+108) then
tmp = x + (y * (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+56) {
tmp = y;
} else if (t <= 3e+108) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.4e+56: tmp = y elif t <= 3e+108: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.4e+56) tmp = y; elseif (t <= 3e+108) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.4e+56) tmp = y; elseif (t <= 3e+108) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e+56], y, If[LessEqual[t, 3e+108], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+108}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.40000000000000013e56 or 2.99999999999999984e108 < t Initial program 37.8%
associate-/l*71.9%
*-commutative71.9%
Applied egg-rr71.9%
Taylor expanded in t around inf 56.4%
if -2.40000000000000013e56 < t < 2.99999999999999984e108Initial program 84.2%
associate-/l*93.9%
*-commutative93.9%
Applied egg-rr93.9%
Taylor expanded in y around inf 76.1%
Taylor expanded in t around 0 62.0%
Final simplification59.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.65e+175) (not (<= z 4.8e+110))) (* z (/ y a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+175) || !(z <= 4.8e+110)) {
tmp = z * (y / a);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.65d+175)) .or. (.not. (z <= 4.8d+110))) then
tmp = z * (y / a)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+175) || !(z <= 4.8e+110)) {
tmp = z * (y / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+175) or not (z <= 4.8e+110): tmp = z * (y / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+175) || !(z <= 4.8e+110)) tmp = Float64(z * Float64(y / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.65e+175) || ~((z <= 4.8e+110))) tmp = z * (y / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+175], N[Not[LessEqual[z, 4.8e+110]], $MachinePrecision]], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+175} \lor \neg \left(z \leq 4.8 \cdot 10^{+110}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.6500000000000001e175 or 4.80000000000000025e110 < z Initial program 73.1%
+-commutative73.1%
associate-/l*98.2%
fma-define98.2%
Simplified98.2%
Taylor expanded in z around inf 80.6%
Taylor expanded in a around inf 68.2%
Taylor expanded in y around inf 52.1%
if -1.6500000000000001e175 < z < 4.80000000000000025e110Initial program 65.2%
associate-/l*81.3%
*-commutative81.3%
Applied egg-rr81.3%
Taylor expanded in y around inf 71.7%
Taylor expanded in t around inf 47.1%
Final simplification48.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.1e+161) x (if (<= a 1.75e-116) y (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.1e+161) {
tmp = x;
} else if (a <= 1.75e-116) {
tmp = y;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.1d+161)) then
tmp = x
else if (a <= 1.75d-116) then
tmp = y
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.1e+161) {
tmp = x;
} else if (a <= 1.75e-116) {
tmp = y;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.1e+161: tmp = x elif a <= 1.75e-116: tmp = y else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.1e+161) tmp = x; elseif (a <= 1.75e-116) tmp = y; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.1e+161) tmp = x; elseif (a <= 1.75e-116) tmp = y; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.1e+161], x, If[LessEqual[a, 1.75e-116], y, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{+161}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-116}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.09999999999999964e161Initial program 58.1%
+-commutative58.1%
associate-/l*94.6%
fma-define94.6%
Simplified94.6%
Taylor expanded in a around inf 60.1%
if -5.09999999999999964e161 < a < 1.74999999999999992e-116Initial program 67.7%
associate-/l*79.6%
*-commutative79.6%
Applied egg-rr79.6%
Taylor expanded in t around inf 35.7%
if 1.74999999999999992e-116 < a Initial program 71.2%
associate-/l*90.7%
*-commutative90.7%
Applied egg-rr90.7%
Taylor expanded in y around inf 77.3%
Taylor expanded in t around inf 44.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.1e+56) y (if (<= t 1.2e+101) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+56) {
tmp = y;
} else if (t <= 1.2e+101) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.1d+56)) then
tmp = y
else if (t <= 1.2d+101) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+56) {
tmp = y;
} else if (t <= 1.2e+101) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e+56: tmp = y elif t <= 1.2e+101: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+56) tmp = y; elseif (t <= 1.2e+101) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.1e+56) tmp = y; elseif (t <= 1.2e+101) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+56], y, If[LessEqual[t, 1.2e+101], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+56}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.10000000000000017e56 or 1.19999999999999994e101 < t Initial program 39.8%
associate-/l*72.8%
*-commutative72.8%
Applied egg-rr72.8%
Taylor expanded in t around inf 54.8%
if -2.10000000000000017e56 < t < 1.19999999999999994e101Initial program 83.9%
+-commutative83.9%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in a around inf 33.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 67.4%
+-commutative67.4%
associate-/l*85.9%
fma-define85.9%
Simplified85.9%
Taylor expanded in a around inf 25.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024146
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))