
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (pow (exp t) t) (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((pow(exp(t), t) * (2.0 * z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((exp(t) ** t) * (2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((Math.pow(Math.exp(t), t) * (2.0 * z)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((math.pow(math.exp(t), t) * (2.0 * z)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64((exp(t) ^ t) * Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((exp(t) ^ t) * (2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision] * N[(2.0 * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{{\left(e^{t}\right)}^{t} \cdot \left(2 \cdot z\right)}
\end{array}
Initial program 98.7%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
pow299.8%
pow-exp99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (exp (pow t 2.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * exp(pow(t, 2.0))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((2.0d0 * z) * exp((t ** 2.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((2.0 * z) * Math.exp(Math.pow(t, 2.0))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((2.0 * z) * math.exp(math.pow(t, 2.0))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * exp((t ^ 2.0))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * exp((t ^ 2.0)))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Exp[N[Power[t, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}
\end{array}
Initial program 98.7%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 2700.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 2.25e+148)
(sqrt (* 2.0 (* z (* t_1 t_1))))
(if (<= t 2.1e+243)
(* (sqrt z) (* t (* (sqrt 2.0) (- y))))
(* 0.5 (* t (* x (* (sqrt 2.0) (sqrt z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 2700.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 2.25e+148) {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
} else if (t <= 2.1e+243) {
tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
} else {
tmp = 0.5 * (t * (x * (sqrt(2.0) * sqrt(z))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 2700.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 2.25d+148) then
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
else if (t <= 2.1d+243) then
tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
else
tmp = 0.5d0 * (t * (x * (sqrt(2.0d0) * sqrt(z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 2700.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 2.25e+148) {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
} else if (t <= 2.1e+243) {
tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
} else {
tmp = 0.5 * (t * (x * (Math.sqrt(2.0) * Math.sqrt(z))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 2700.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 2.25e+148: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) elif t <= 2.1e+243: tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y)) else: tmp = 0.5 * (t * (x * (math.sqrt(2.0) * math.sqrt(z)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 2700.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 2.25e+148) tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); elseif (t <= 2.1e+243) tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y)))); else tmp = Float64(0.5 * Float64(t * Float64(x * Float64(sqrt(2.0) * sqrt(z))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 2700.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 2.25e+148) tmp = sqrt((2.0 * (z * (t_1 * t_1)))); elseif (t <= 2.1e+243) tmp = sqrt(z) * (t * (sqrt(2.0) * -y)); else tmp = 0.5 * (t * (x * (sqrt(2.0) * sqrt(z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 2700.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+148], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.1e+243], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(t * N[(x * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 2700:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+243}:\\
\;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(\sqrt{2} \cdot \sqrt{z}\right)\right)\right)\\
\end{array}
\end{array}
if t < 2700Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 2700 < t < 2.24999999999999997e148Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 19.1%
add-sqr-sqrt15.0%
sqrt-unprod34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
swap-sqr34.7%
rem-square-sqrt34.7%
*-commutative34.7%
Applied egg-rr43.4%
unpow243.4%
Applied egg-rr43.4%
if 2.24999999999999997e148 < t < 2.0999999999999999e243Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around 0 45.9%
mul-1-neg45.9%
*-commutative45.9%
*-commutative45.9%
Simplified45.9%
if 2.0999999999999999e243 < t Initial program 85.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 58.1%
associate-*l*58.0%
associate-*l*58.0%
Simplified58.0%
Final simplification61.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 6800.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 9.6e+147)
(sqrt (* 2.0 (* z (* t_1 t_1))))
(if (<= t 1.02e+243)
(* (sqrt z) (* t (* (sqrt 2.0) (- y))))
(* 0.5 (* (sqrt z) (* t (* x (sqrt 2.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 6800.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 9.6e+147) {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
} else if (t <= 1.02e+243) {
tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
} else {
tmp = 0.5 * (sqrt(z) * (t * (x * sqrt(2.0))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 6800.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 9.6d+147) then
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
else if (t <= 1.02d+243) then
tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
else
tmp = 0.5d0 * (sqrt(z) * (t * (x * sqrt(2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 6800.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 9.6e+147) {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
} else if (t <= 1.02e+243) {
tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
} else {
tmp = 0.5 * (Math.sqrt(z) * (t * (x * Math.sqrt(2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 6800.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 9.6e+147: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) elif t <= 1.02e+243: tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y)) else: tmp = 0.5 * (math.sqrt(z) * (t * (x * math.sqrt(2.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 6800.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 9.6e+147) tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); elseif (t <= 1.02e+243) tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y)))); else tmp = Float64(0.5 * Float64(sqrt(z) * Float64(t * Float64(x * sqrt(2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 6800.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 9.6e+147) tmp = sqrt((2.0 * (z * (t_1 * t_1)))); elseif (t <= 1.02e+243) tmp = sqrt(z) * (t * (sqrt(2.0) * -y)); else tmp = 0.5 * (sqrt(z) * (t * (x * sqrt(2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 6800.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+147], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.02e+243], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 6800:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+243}:\\
\;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\sqrt{z} \cdot \left(t \cdot \left(x \cdot \sqrt{2}\right)\right)\right)\\
\end{array}
\end{array}
if t < 6800Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 6800 < t < 9.60000000000000007e147Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 19.1%
add-sqr-sqrt15.0%
sqrt-unprod34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
swap-sqr34.7%
rem-square-sqrt34.7%
*-commutative34.7%
Applied egg-rr43.4%
unpow243.4%
Applied egg-rr43.4%
if 9.60000000000000007e147 < t < 1.01999999999999999e243Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around 0 45.9%
mul-1-neg45.9%
*-commutative45.9%
*-commutative45.9%
Simplified45.9%
if 1.01999999999999999e243 < t Initial program 85.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 58.1%
Final simplification61.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 5600.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 2.5e+137)
(sqrt (* 2.0 (* z (* t_1 t_1))))
(* t (* (sqrt 2.0) (* t_1 (sqrt z))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 5600.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 2.5e+137) {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = t * (sqrt(2.0) * (t_1 * sqrt(z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 5600.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 2.5d+137) then
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
else
tmp = t * (sqrt(2.0d0) * (t_1 * sqrt(z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 5600.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 2.5e+137) {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = t * (Math.sqrt(2.0) * (t_1 * Math.sqrt(z)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 5600.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 2.5e+137: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) else: tmp = t * (math.sqrt(2.0) * (t_1 * math.sqrt(z))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 5600.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 2.5e+137) tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); else tmp = Float64(t * Float64(sqrt(2.0) * Float64(t_1 * sqrt(z)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 5600.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 2.5e+137) tmp = sqrt((2.0 * (z * (t_1 * t_1)))); else tmp = t * (sqrt(2.0) * (t_1 * sqrt(z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 5600.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+137], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 5600:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\sqrt{2} \cdot \left(t\_1 \cdot \sqrt{z}\right)\right)\\
\end{array}
\end{array}
if t < 5600Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 5600 < t < 2.5000000000000001e137Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 20.0%
add-sqr-sqrt15.6%
sqrt-unprod33.6%
*-commutative33.6%
sqrt-prod33.6%
*-commutative33.6%
associate-*r*33.6%
*-commutative33.6%
sqrt-prod33.6%
*-commutative33.6%
associate-*r*33.6%
swap-sqr33.6%
rem-square-sqrt33.6%
*-commutative33.6%
Applied egg-rr42.8%
unpow242.8%
Applied egg-rr42.8%
if 2.5000000000000001e137 < t Initial program 94.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
*-commutative100.0%
sqrt-prod97.2%
Applied egg-rr97.2%
fma-undefine97.2%
unpow297.2%
+-commutative97.2%
unpow297.2%
hypot-1-def66.6%
Simplified66.6%
Taylor expanded in t around inf 74.6%
associate-*l*66.5%
*-commutative66.5%
associate-*r*66.5%
*-commutative66.5%
*-commutative66.5%
Simplified66.5%
Final simplification63.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 4400.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 4.6e+137)
(sqrt (* 2.0 (* z (* t_1 t_1))))
(* (sqrt 2.0) (* t_1 (* t (sqrt z))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 4400.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 4.6e+137) {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = sqrt(2.0) * (t_1 * (t * sqrt(z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 4400.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 4.6d+137) then
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
else
tmp = sqrt(2.0d0) * (t_1 * (t * sqrt(z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 4400.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 4.6e+137) {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = Math.sqrt(2.0) * (t_1 * (t * Math.sqrt(z)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 4400.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 4.6e+137: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) else: tmp = math.sqrt(2.0) * (t_1 * (t * math.sqrt(z))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 4400.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 4.6e+137) tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); else tmp = Float64(sqrt(2.0) * Float64(t_1 * Float64(t * sqrt(z)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 4400.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 4.6e+137) tmp = sqrt((2.0 * (z * (t_1 * t_1)))); else tmp = sqrt(2.0) * (t_1 * (t * sqrt(z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 4400.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+137], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[(t * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 4400:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(t\_1 \cdot \left(t \cdot \sqrt{z}\right)\right)\\
\end{array}
\end{array}
if t < 4400Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 4400 < t < 4.59999999999999999e137Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 20.0%
add-sqr-sqrt15.6%
sqrt-unprod33.6%
*-commutative33.6%
sqrt-prod33.6%
*-commutative33.6%
associate-*r*33.6%
*-commutative33.6%
sqrt-prod33.6%
*-commutative33.6%
associate-*r*33.6%
swap-sqr33.6%
rem-square-sqrt33.6%
*-commutative33.6%
Applied egg-rr42.8%
unpow242.8%
Applied egg-rr42.8%
if 4.59999999999999999e137 < t Initial program 94.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in58.8%
sqrt-prod58.8%
sqrt-prod58.8%
sqrt-pow167.6%
metadata-eval67.6%
pow167.6%
sqrt-prod67.6%
sqrt-prod67.8%
sqrt-pow151.9%
metadata-eval51.9%
pow151.9%
Applied egg-rr51.9%
distribute-lft-out66.6%
sub-neg66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
Simplified66.6%
Final simplification63.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 3900.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 2.05e+147)
(sqrt (* 2.0 (* z (* t_1 t_1))))
(* (sqrt z) (* t (* (sqrt 2.0) (- y))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 3900.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 2.05e+147) {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = sqrt(z) * (t * (sqrt(2.0) * -y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 3900.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 2.05d+147) then
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
else
tmp = sqrt(z) * (t * (sqrt(2.0d0) * -y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 3900.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 2.05e+147) {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
} else {
tmp = Math.sqrt(z) * (t * (Math.sqrt(2.0) * -y));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 3900.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 2.05e+147: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) else: tmp = math.sqrt(z) * (t * (math.sqrt(2.0) * -y)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 3900.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 2.05e+147) tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); else tmp = Float64(sqrt(z) * Float64(t * Float64(sqrt(2.0) * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 3900.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 2.05e+147) tmp = sqrt((2.0 * (z * (t_1 * t_1)))); else tmp = sqrt(z) * (t * (sqrt(2.0) * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 3900.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+147], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[z], $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * (-y)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 3900:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{z} \cdot \left(t \cdot \left(\sqrt{2} \cdot \left(-y\right)\right)\right)\\
\end{array}
\end{array}
if t < 3900Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 3900 < t < 2.04999999999999983e147Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 19.1%
add-sqr-sqrt15.0%
sqrt-unprod34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
*-commutative34.7%
sqrt-prod34.7%
*-commutative34.7%
associate-*r*34.7%
swap-sqr34.7%
rem-square-sqrt34.7%
*-commutative34.7%
Applied egg-rr43.4%
unpow243.4%
Applied egg-rr43.4%
if 2.04999999999999983e147 < t Initial program 93.8%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
*-commutative45.2%
*-commutative45.2%
Simplified45.2%
Final simplification60.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1900.0)
(* (sqrt (* 2.0 z)) (* t_1 (hypot 1.0 t)))
(* t_1 (sqrt (* 2.0 (* z (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1900.0) {
tmp = sqrt((2.0 * z)) * (t_1 * hypot(1.0, t));
} else {
tmp = t_1 * sqrt((2.0 * (z * pow(t, 2.0))));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1900.0) {
tmp = Math.sqrt((2.0 * z)) * (t_1 * Math.hypot(1.0, t));
} else {
tmp = t_1 * Math.sqrt((2.0 * (z * Math.pow(t, 2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 1900.0: tmp = math.sqrt((2.0 * z)) * (t_1 * math.hypot(1.0, t)) else: tmp = t_1 * math.sqrt((2.0 * (z * math.pow(t, 2.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1900.0) tmp = Float64(sqrt(Float64(2.0 * z)) * Float64(t_1 * hypot(1.0, t))); else tmp = Float64(t_1 * sqrt(Float64(2.0 * Float64(z * (t ^ 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 1900.0) tmp = sqrt((2.0 * z)) * (t_1 * hypot(1.0, t)); else tmp = t_1 * sqrt((2.0 * (z * (t ^ 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1900.0], N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1900:\\
\;\;\;\;\sqrt{2 \cdot z} \cdot \left(t\_1 \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\
\end{array}
\end{array}
if t < 1900Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 87.0%
+-commutative87.0%
unpow287.0%
fma-define87.0%
Simplified87.0%
*-commutative87.0%
sqrt-prod84.0%
Applied egg-rr84.0%
fma-undefine84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
hypot-1-def77.5%
Simplified77.5%
*-commutative77.5%
sub-neg77.5%
distribute-lft-in73.4%
Applied egg-rr73.4%
associate-*l*74.8%
associate-*l*75.9%
distribute-lft-out75.9%
distribute-lft-out78.5%
*-commutative78.5%
sub-neg78.5%
Simplified78.5%
if 1900 < t Initial program 96.9%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 72.3%
+-commutative72.3%
unpow272.3%
fma-define72.3%
Simplified72.3%
Taylor expanded in t around inf 72.3%
Final simplification77.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1.0)
(* t_1 (sqrt (* 2.0 z)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1.0) {
tmp = t_1 * sqrt((2.0 * z));
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 1.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else
tmp = (t * (t_1 * sqrt(2.0d0))) * sqrt(z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else {
tmp = (t * (t_1 * Math.sqrt(2.0))) * Math.sqrt(z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 1.0: tmp = t_1 * math.sqrt((2.0 * z)) else: tmp = (t * (t_1 * math.sqrt(2.0))) * math.sqrt(z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); else tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 1.0) tmp = t_1 * sqrt((2.0 * z)); else tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 1Initial program 99.3%
associate-*l*99.9%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around 0 66.4%
if 1 < t Initial program 96.8%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 71.3%
+-commutative71.3%
unpow271.3%
fma-define71.3%
Simplified71.3%
Taylor expanded in t around inf 55.4%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (fma t t 1.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * fma(t, t, 1.0)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}
\end{array}
Initial program 98.7%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 83.3%
+-commutative83.3%
unpow283.3%
fma-define83.3%
Simplified83.3%
Final simplification83.3%
(FPCore (x y z t) :precision binary64 (* (sqrt (* 2.0 z)) (* (- (* x 0.5) y) (hypot 1.0 t))))
double code(double x, double y, double z, double t) {
return sqrt((2.0 * z)) * (((x * 0.5) - y) * hypot(1.0, t));
}
public static double code(double x, double y, double z, double t) {
return Math.sqrt((2.0 * z)) * (((x * 0.5) - y) * Math.hypot(1.0, t));
}
def code(x, y, z, t): return math.sqrt((2.0 * z)) * (((x * 0.5) - y) * math.hypot(1.0, t))
function code(x, y, z, t) return Float64(sqrt(Float64(2.0 * z)) * Float64(Float64(Float64(x * 0.5) - y) * hypot(1.0, t))) end
function tmp = code(x, y, z, t) tmp = sqrt((2.0 * z)) * (((x * 0.5) - y) * hypot(1.0, t)); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot z} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \mathsf{hypot}\left(1, t\right)\right)
\end{array}
Initial program 98.7%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 83.3%
+-commutative83.3%
unpow283.3%
fma-define83.3%
Simplified83.3%
*-commutative83.3%
sqrt-prod79.2%
Applied egg-rr79.2%
fma-undefine79.2%
unpow279.2%
+-commutative79.2%
unpow279.2%
hypot-1-def70.3%
Simplified70.3%
*-commutative70.3%
sub-neg70.3%
distribute-lft-in65.2%
Applied egg-rr65.2%
associate-*l*67.0%
associate-*l*68.5%
distribute-lft-out68.9%
distribute-lft-out72.8%
*-commutative72.8%
sub-neg72.8%
Simplified72.8%
Final simplification72.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 650000.0)
(* t_1 (sqrt (* 2.0 z)))
(sqrt (* 2.0 (* z (* t_1 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 650000.0) {
tmp = t_1 * sqrt((2.0 * z));
} else {
tmp = sqrt((2.0 * (z * (t_1 * t_1))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 650000.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else
tmp = sqrt((2.0d0 * (z * (t_1 * t_1))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 650000.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt((2.0 * (z * (t_1 * t_1))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 650000.0: tmp = t_1 * math.sqrt((2.0 * z)) else: tmp = math.sqrt((2.0 * (z * (t_1 * t_1)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 650000.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); else tmp = sqrt(Float64(2.0 * Float64(z * Float64(t_1 * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 650000.0) tmp = t_1 * sqrt((2.0 * z)); else tmp = sqrt((2.0 * (z * (t_1 * t_1)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 650000.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(z * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 650000:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(t\_1 \cdot t\_1\right)\right)}\\
\end{array}
\end{array}
if t < 6.5e5Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 66.1%
if 6.5e5 < t Initial program 96.9%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 17.6%
add-sqr-sqrt8.5%
sqrt-unprod25.8%
*-commutative25.8%
sqrt-prod25.8%
*-commutative25.8%
associate-*r*25.8%
*-commutative25.8%
sqrt-prod25.8%
*-commutative25.8%
associate-*r*25.8%
swap-sqr25.8%
rem-square-sqrt25.8%
*-commutative25.8%
Applied egg-rr31.7%
unpow231.7%
Applied egg-rr31.7%
Final simplification57.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.02e+27) (sqrt (* 2.0 (* z (* y (- y x))))) (* 0.5 (* x (sqrt (* 2.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+27) {
tmp = sqrt((2.0 * (z * (y * (y - x)))));
} else {
tmp = 0.5 * (x * sqrt((2.0 * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.02d+27)) then
tmp = sqrt((2.0d0 * (z * (y * (y - x)))))
else
tmp = 0.5d0 * (x * sqrt((2.0d0 * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+27) {
tmp = Math.sqrt((2.0 * (z * (y * (y - x)))));
} else {
tmp = 0.5 * (x * Math.sqrt((2.0 * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e+27: tmp = math.sqrt((2.0 * (z * (y * (y - x))))) else: tmp = 0.5 * (x * math.sqrt((2.0 * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e+27) tmp = sqrt(Float64(2.0 * Float64(z * Float64(y * Float64(y - x))))); else tmp = Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e+27) tmp = sqrt((2.0 * (z * (y * (y - x))))); else tmp = 0.5 * (x * sqrt((2.0 * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e+27], N[Sqrt[N[(2.0 * N[(z * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+27}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot \left(y - x\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\\
\end{array}
\end{array}
if y < -1.0199999999999999e27Initial program 99.9%
associate-*l*99.9%
exp-sqrt99.9%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around 0 59.4%
add-sqr-sqrt55.5%
sqrt-unprod61.5%
*-commutative61.5%
sqrt-prod61.5%
*-commutative61.5%
associate-*r*61.5%
*-commutative61.5%
sqrt-prod61.5%
*-commutative61.5%
associate-*r*61.4%
swap-sqr61.4%
rem-square-sqrt61.5%
*-commutative61.5%
Applied egg-rr67.0%
Taylor expanded in x around 0 50.1%
+-commutative50.1%
mul-1-neg50.1%
associate-*r*52.2%
distribute-lft-neg-in52.2%
mul-1-neg52.2%
distribute-rgt-out57.9%
mul-1-neg57.9%
unsub-neg57.9%
unpow257.9%
distribute-rgt-out--67.0%
Simplified67.0%
if -1.0199999999999999e27 < y Initial program 98.3%
Taylor expanded in t around 0 52.0%
Taylor expanded in x around inf 31.9%
associate-*l*32.0%
Simplified32.0%
sqrt-prod32.1%
pow1/232.1%
Applied egg-rr32.1%
unpow1/232.1%
Simplified32.1%
Final simplification39.6%
(FPCore (x y z t) :precision binary64 (if (<= t 1.95e+23) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (sqrt (* 2.0 (* z (* y (- y x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.95e+23) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = sqrt((2.0 * (z * (y * (y - x)))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1.95d+23) then
tmp = ((x * 0.5d0) - y) * sqrt((2.0d0 * z))
else
tmp = sqrt((2.0d0 * (z * (y * (y - x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.95e+23) {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt((2.0 * (z * (y * (y - x)))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.95e+23: tmp = ((x * 0.5) - y) * math.sqrt((2.0 * z)) else: tmp = math.sqrt((2.0 * (z * (y * (y - x))))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.95e+23) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = sqrt(Float64(2.0 * Float64(z * Float64(y * Float64(y - x))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.95e+23) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); else tmp = sqrt((2.0 * (z * (y * (y - x))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.95e+23], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(z * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.95 \cdot 10^{+23}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot \left(y \cdot \left(y - x\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.95e23Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 65.2%
if 1.95e23 < t Initial program 96.6%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 15.7%
add-sqr-sqrt7.3%
sqrt-unprod23.2%
*-commutative23.2%
sqrt-prod23.2%
*-commutative23.2%
associate-*r*23.2%
*-commutative23.2%
sqrt-prod23.2%
*-commutative23.2%
associate-*r*23.2%
swap-sqr23.2%
rem-square-sqrt23.2%
*-commutative23.2%
Applied egg-rr29.7%
Taylor expanded in x around 0 12.8%
+-commutative12.8%
mul-1-neg12.8%
associate-*r*12.8%
distribute-lft-neg-in12.8%
mul-1-neg12.8%
distribute-rgt-out14.5%
mul-1-neg14.5%
unsub-neg14.5%
unpow214.5%
distribute-rgt-out--16.2%
Simplified16.2%
Final simplification53.9%
(FPCore (x y z t) :precision binary64 (* 0.5 (* x (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return 0.5 * (x * sqrt((2.0 * z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 0.5d0 * (x * sqrt((2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return 0.5 * (x * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return 0.5 * (x * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = 0.5 * (x * sqrt((2.0 * z))); end
code[x_, y_, z_, t_] := N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 98.7%
Taylor expanded in t around 0 53.6%
Taylor expanded in x around inf 27.4%
associate-*l*27.4%
Simplified27.4%
sqrt-prod27.5%
pow1/227.5%
Applied egg-rr27.5%
unpow1/227.5%
Simplified27.5%
Final simplification27.5%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024077
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0)))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))