
(FPCore (z0) :precision binary64 (log (/ -0.421875 (* (* (- 1.0 z0) (- 1.0 z0)) (- z0 1.0)))))
double code(double z0) {
return log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
code = log(((-0.421875d0) / (((1.0d0 - z0) * (1.0d0 - z0)) * (z0 - 1.0d0))))
end function
public static double code(double z0) {
return Math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
def code(z0): return math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))))
function code(z0) return log(Float64(-0.421875 / Float64(Float64(Float64(1.0 - z0) * Float64(1.0 - z0)) * Float64(z0 - 1.0)))) end
function tmp = code(z0) tmp = log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0)))); end
code[z0_] := N[Log[N[(-0.421875 / N[(N[(N[(1.0 - z0), $MachinePrecision] * N[(1.0 - z0), $MachinePrecision]), $MachinePrecision] * N[(z0 - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\log \left(\frac{-0.421875}{\left(\left(1 - z0\right) \cdot \left(1 - z0\right)\right) \cdot \left(z0 - 1\right)}\right)
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (z0) :precision binary64 (log (/ -0.421875 (* (* (- 1.0 z0) (- 1.0 z0)) (- z0 1.0)))))
double code(double z0) {
return log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
code = log(((-0.421875d0) / (((1.0d0 - z0) * (1.0d0 - z0)) * (z0 - 1.0d0))))
end function
public static double code(double z0) {
return Math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
def code(z0): return math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))))
function code(z0) return log(Float64(-0.421875 / Float64(Float64(Float64(1.0 - z0) * Float64(1.0 - z0)) * Float64(z0 - 1.0)))) end
function tmp = code(z0) tmp = log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0)))); end
code[z0_] := N[Log[N[(-0.421875 / N[(N[(N[(1.0 - z0), $MachinePrecision] * N[(1.0 - z0), $MachinePrecision]), $MachinePrecision] * N[(z0 - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\log \left(\frac{-0.421875}{\left(\left(1 - z0\right) \cdot \left(1 - z0\right)\right) \cdot \left(z0 - 1\right)}\right)
(FPCore (z0)
:precision binary64
(if (<= z0 -4e+102)
(- (* (log (- z0)) -2.0) (log (* -2.3703703703703702 z0)))
(log
(/
1.0
(+
2.3703703703703702
(*
z0
(-
(* z0 (+ 7.111111111111111 (* -2.3703703703703702 z0)))
7.111111111111111)))))))double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = (log(-z0) * -2.0) - log((-2.3703703703703702 * z0));
} else {
tmp = log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111)))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-4d+102)) then
tmp = (log(-z0) * (-2.0d0)) - log(((-2.3703703703703702d0) * z0))
else
tmp = log((1.0d0 / (2.3703703703703702d0 + (z0 * ((z0 * (7.111111111111111d0 + ((-2.3703703703703702d0) * z0))) - 7.111111111111111d0)))))
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = (Math.log(-z0) * -2.0) - Math.log((-2.3703703703703702 * z0));
} else {
tmp = Math.log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111)))));
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -4e+102: tmp = (math.log(-z0) * -2.0) - math.log((-2.3703703703703702 * z0)) else: tmp = math.log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111))))) return tmp
function code(z0) tmp = 0.0 if (z0 <= -4e+102) tmp = Float64(Float64(log(Float64(-z0)) * -2.0) - log(Float64(-2.3703703703703702 * z0))); else tmp = log(Float64(1.0 / Float64(2.3703703703703702 + Float64(z0 * Float64(Float64(z0 * Float64(7.111111111111111 + Float64(-2.3703703703703702 * z0))) - 7.111111111111111))))); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -4e+102) tmp = (log(-z0) * -2.0) - log((-2.3703703703703702 * z0)); else tmp = log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111))))); end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -4e+102], N[(N[(N[Log[(-z0)], $MachinePrecision] * -2.0), $MachinePrecision] - N[Log[N[(-2.3703703703703702 * z0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 / N[(2.3703703703703702 + N[(z0 * N[(N[(z0 * N[(7.111111111111111 + N[(-2.3703703703703702 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 7.111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z0 \leq -4 \cdot 10^{+102}:\\
\;\;\;\;\log \left(-z0\right) \cdot -2 - \log \left(-2.3703703703703702 \cdot z0\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{1}{2.3703703703703702 + z0 \cdot \left(z0 \cdot \left(7.111111111111111 + -2.3703703703703702 \cdot z0\right) - 7.111111111111111\right)}\right)\\
\end{array}
if z0 < -3.9999999999999999e102Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-log.f64N/A
log-pow-revN/A
lift-log.f64N/A
sum-logN/A
unpow3N/A
associate-*l*N/A
log-prodN/A
lower-unsound-+.f64N/A
Applied rewrites32.3%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
lift-log.f64N/A
neg-logN/A
lower-log.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
metadata-evalN/A
div-flip-revN/A
lower-/.f6432.3%
Applied rewrites32.3%
lift-*.f64N/A
*-commutativeN/A
lower-unsound-log.f64N/A
lower-*.f64N/A
lower-unsound-log.f6432.3%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f6432.3%
Applied rewrites32.3%
if -3.9999999999999999e102 < z0 Initial program 79.1%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6479.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.1%
lift-*.f64N/A
sqr-neg-revN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
(FPCore (z0)
:precision binary64
(if (<= z0 -4e+102)
(+ -0.8630462173553428 (* 3.0 (log (/ -1.0 z0))))
(log
(/
1.0
(+
2.3703703703703702
(*
z0
(-
(* z0 (+ 7.111111111111111 (* -2.3703703703703702 z0)))
7.111111111111111)))))))double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0)));
} else {
tmp = log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111)))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-4d+102)) then
tmp = (-0.8630462173553428d0) + (3.0d0 * log(((-1.0d0) / z0)))
else
tmp = log((1.0d0 / (2.3703703703703702d0 + (z0 * ((z0 * (7.111111111111111d0 + ((-2.3703703703703702d0) * z0))) - 7.111111111111111d0)))))
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = -0.8630462173553428 + (3.0 * Math.log((-1.0 / z0)));
} else {
tmp = Math.log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111)))));
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -4e+102: tmp = -0.8630462173553428 + (3.0 * math.log((-1.0 / z0))) else: tmp = math.log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111))))) return tmp
function code(z0) tmp = 0.0 if (z0 <= -4e+102) tmp = Float64(-0.8630462173553428 + Float64(3.0 * log(Float64(-1.0 / z0)))); else tmp = log(Float64(1.0 / Float64(2.3703703703703702 + Float64(z0 * Float64(Float64(z0 * Float64(7.111111111111111 + Float64(-2.3703703703703702 * z0))) - 7.111111111111111))))); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -4e+102) tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0))); else tmp = log((1.0 / (2.3703703703703702 + (z0 * ((z0 * (7.111111111111111 + (-2.3703703703703702 * z0))) - 7.111111111111111))))); end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -4e+102], N[(-0.8630462173553428 + N[(3.0 * N[Log[N[(-1.0 / z0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 / N[(2.3703703703703702 + N[(z0 * N[(N[(z0 * N[(7.111111111111111 + N[(-2.3703703703703702 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 7.111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z0 \leq -4 \cdot 10^{+102}:\\
\;\;\;\;-0.8630462173553428 + 3 \cdot \log \left(\frac{-1}{z0}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{1}{2.3703703703703702 + z0 \cdot \left(z0 \cdot \left(7.111111111111111 + -2.3703703703703702 \cdot z0\right) - 7.111111111111111\right)}\right)\\
\end{array}
if z0 < -3.9999999999999999e102Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
Evaluated real constant32.3%
if -3.9999999999999999e102 < z0 Initial program 79.1%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6479.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.1%
lift-*.f64N/A
sqr-neg-revN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
(FPCore (z0) :precision binary64 (if (<= z0 -4e+103) (+ -0.8630462173553428 (* 3.0 (log (/ -1.0 z0)))) (log (/ -0.421875 (* (* (- 1.0 z0) (- 1.0 z0)) (- z0 1.0))))))
double code(double z0) {
double tmp;
if (z0 <= -4e+103) {
tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0)));
} else {
tmp = log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-4d+103)) then
tmp = (-0.8630462173553428d0) + (3.0d0 * log(((-1.0d0) / z0)))
else
tmp = log(((-0.421875d0) / (((1.0d0 - z0) * (1.0d0 - z0)) * (z0 - 1.0d0))))
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -4e+103) {
tmp = -0.8630462173553428 + (3.0 * Math.log((-1.0 / z0)));
} else {
tmp = Math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0))));
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -4e+103: tmp = -0.8630462173553428 + (3.0 * math.log((-1.0 / z0))) else: tmp = math.log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0)))) return tmp
function code(z0) tmp = 0.0 if (z0 <= -4e+103) tmp = Float64(-0.8630462173553428 + Float64(3.0 * log(Float64(-1.0 / z0)))); else tmp = log(Float64(-0.421875 / Float64(Float64(Float64(1.0 - z0) * Float64(1.0 - z0)) * Float64(z0 - 1.0)))); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -4e+103) tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0))); else tmp = log((-0.421875 / (((1.0 - z0) * (1.0 - z0)) * (z0 - 1.0)))); end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -4e+103], N[(-0.8630462173553428 + N[(3.0 * N[Log[N[(-1.0 / z0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(-0.421875 / N[(N[(N[(1.0 - z0), $MachinePrecision] * N[(1.0 - z0), $MachinePrecision]), $MachinePrecision] * N[(z0 - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z0 \leq -4 \cdot 10^{+103}:\\
\;\;\;\;-0.8630462173553428 + 3 \cdot \log \left(\frac{-1}{z0}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{-0.421875}{\left(\left(1 - z0\right) \cdot \left(1 - z0\right)\right) \cdot \left(z0 - 1\right)}\right)\\
\end{array}
if z0 < -4e103Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
Evaluated real constant32.3%
if -4e103 < z0 Initial program 79.1%
(FPCore (z0)
:precision binary64
(if (<= z0 -4e+102)
(+ -0.8630462173553428 (* 3.0 (log (/ -1.0 z0))))
(-
(log
(-
(*
(-
(* (- (* -2.3703703703703702 z0) -7.111111111111111) z0)
7.111111111111111)
z0)
-2.3703703703703702)))))double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0)));
} else {
tmp = -log(((((((-2.3703703703703702 * z0) - -7.111111111111111) * z0) - 7.111111111111111) * z0) - -2.3703703703703702));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-4d+102)) then
tmp = (-0.8630462173553428d0) + (3.0d0 * log(((-1.0d0) / z0)))
else
tmp = -log((((((((-2.3703703703703702d0) * z0) - (-7.111111111111111d0)) * z0) - 7.111111111111111d0) * z0) - (-2.3703703703703702d0)))
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -4e+102) {
tmp = -0.8630462173553428 + (3.0 * Math.log((-1.0 / z0)));
} else {
tmp = -Math.log(((((((-2.3703703703703702 * z0) - -7.111111111111111) * z0) - 7.111111111111111) * z0) - -2.3703703703703702));
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -4e+102: tmp = -0.8630462173553428 + (3.0 * math.log((-1.0 / z0))) else: tmp = -math.log(((((((-2.3703703703703702 * z0) - -7.111111111111111) * z0) - 7.111111111111111) * z0) - -2.3703703703703702)) return tmp
function code(z0) tmp = 0.0 if (z0 <= -4e+102) tmp = Float64(-0.8630462173553428 + Float64(3.0 * log(Float64(-1.0 / z0)))); else tmp = Float64(-log(Float64(Float64(Float64(Float64(Float64(Float64(-2.3703703703703702 * z0) - -7.111111111111111) * z0) - 7.111111111111111) * z0) - -2.3703703703703702))); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -4e+102) tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0))); else tmp = -log(((((((-2.3703703703703702 * z0) - -7.111111111111111) * z0) - 7.111111111111111) * z0) - -2.3703703703703702)); end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -4e+102], N[(-0.8630462173553428 + N[(3.0 * N[Log[N[(-1.0 / z0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[Log[N[(N[(N[(N[(N[(N[(-2.3703703703703702 * z0), $MachinePrecision] - -7.111111111111111), $MachinePrecision] * z0), $MachinePrecision] - 7.111111111111111), $MachinePrecision] * z0), $MachinePrecision] - -2.3703703703703702), $MachinePrecision]], $MachinePrecision])]
\begin{array}{l}
\mathbf{if}\;z0 \leq -4 \cdot 10^{+102}:\\
\;\;\;\;-0.8630462173553428 + 3 \cdot \log \left(\frac{-1}{z0}\right)\\
\mathbf{else}:\\
\;\;\;\;-\log \left(\left(\left(-2.3703703703703702 \cdot z0 - -7.111111111111111\right) \cdot z0 - 7.111111111111111\right) \cdot z0 - -2.3703703703703702\right)\\
\end{array}
if z0 < -3.9999999999999999e102Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
Evaluated real constant32.3%
if -3.9999999999999999e102 < z0 Initial program 79.1%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6479.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.1%
lift-*.f64N/A
sqr-neg-revN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6479.1%
Applied rewrites79.1%
lift-log.f64N/A
lift-/.f64N/A
log-recN/A
lower-log.f64N/A
lower-unsound-log.f64N/A
lower-neg.f64N/A
lower-unsound-log.f6478.1%
Applied rewrites78.1%
(FPCore (z0) :precision binary64 (if (<= z0 -0.84) (+ -0.8630462173553428 (* 3.0 (log (/ -1.0 z0)))) (- (* (- (* (- z0 -1.5) z0) -3.0) z0) 0.8630462173553428)))
double code(double z0) {
double tmp;
if (z0 <= -0.84) {
tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0)));
} else {
tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-0.84d0)) then
tmp = (-0.8630462173553428d0) + (3.0d0 * log(((-1.0d0) / z0)))
else
tmp = ((((z0 - (-1.5d0)) * z0) - (-3.0d0)) * z0) - 0.8630462173553428d0
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -0.84) {
tmp = -0.8630462173553428 + (3.0 * Math.log((-1.0 / z0)));
} else {
tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428;
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -0.84: tmp = -0.8630462173553428 + (3.0 * math.log((-1.0 / z0))) else: tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428 return tmp
function code(z0) tmp = 0.0 if (z0 <= -0.84) tmp = Float64(-0.8630462173553428 + Float64(3.0 * log(Float64(-1.0 / z0)))); else tmp = Float64(Float64(Float64(Float64(Float64(z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -0.84) tmp = -0.8630462173553428 + (3.0 * log((-1.0 / z0))); else tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428; end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -0.84], N[(-0.8630462173553428 + N[(3.0 * N[Log[N[(-1.0 / z0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(z0 - -1.5), $MachinePrecision] * z0), $MachinePrecision] - -3.0), $MachinePrecision] * z0), $MachinePrecision] - 0.8630462173553428), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z0 \leq -0.84:\\
\;\;\;\;-0.8630462173553428 + 3 \cdot \log \left(\frac{-1}{z0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z0 - -1.5\right) \cdot z0 - -3\right) \cdot z0 - 0.8630462173553428\\
\end{array}
if z0 < -0.83999999999999997Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
Evaluated real constant32.3%
if -0.83999999999999997 < z0 Initial program 79.1%
lift-log.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
log-divN/A
lower-unsound--.f64N/A
Applied rewrites84.6%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f6468.4%
Applied rewrites68.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
lift-log.f64N/A
neg-logN/A
metadata-evalN/A
lift-log.f64N/A
lower--.f6467.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lower--.f6467.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval67.4%
Applied rewrites67.4%
Evaluated real constant68.4%
(FPCore (z0)
:precision binary64
(if (<= z0 -5.4e+101)
-0.8630462173553428
(if (<= z0 -0.84)
(- (log (* (* (* z0 z0) (- z0)) 2.3703703703703702)))
(- (* (- (* (- z0 -1.5) z0) -3.0) z0) 0.8630462173553428))))double code(double z0) {
double tmp;
if (z0 <= -5.4e+101) {
tmp = -0.8630462173553428;
} else if (z0 <= -0.84) {
tmp = -log((((z0 * z0) * -z0) * 2.3703703703703702));
} else {
tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8) :: tmp
if (z0 <= (-5.4d+101)) then
tmp = -0.8630462173553428d0
else if (z0 <= (-0.84d0)) then
tmp = -log((((z0 * z0) * -z0) * 2.3703703703703702d0))
else
tmp = ((((z0 - (-1.5d0)) * z0) - (-3.0d0)) * z0) - 0.8630462173553428d0
end if
code = tmp
end function
public static double code(double z0) {
double tmp;
if (z0 <= -5.4e+101) {
tmp = -0.8630462173553428;
} else if (z0 <= -0.84) {
tmp = -Math.log((((z0 * z0) * -z0) * 2.3703703703703702));
} else {
tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428;
}
return tmp;
}
def code(z0): tmp = 0 if z0 <= -5.4e+101: tmp = -0.8630462173553428 elif z0 <= -0.84: tmp = -math.log((((z0 * z0) * -z0) * 2.3703703703703702)) else: tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428 return tmp
function code(z0) tmp = 0.0 if (z0 <= -5.4e+101) tmp = -0.8630462173553428; elseif (z0 <= -0.84) tmp = Float64(-log(Float64(Float64(Float64(z0 * z0) * Float64(-z0)) * 2.3703703703703702))); else tmp = Float64(Float64(Float64(Float64(Float64(z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428); end return tmp end
function tmp_2 = code(z0) tmp = 0.0; if (z0 <= -5.4e+101) tmp = -0.8630462173553428; elseif (z0 <= -0.84) tmp = -log((((z0 * z0) * -z0) * 2.3703703703703702)); else tmp = ((((z0 - -1.5) * z0) - -3.0) * z0) - 0.8630462173553428; end tmp_2 = tmp; end
code[z0_] := If[LessEqual[z0, -5.4e+101], -0.8630462173553428, If[LessEqual[z0, -0.84], (-N[Log[N[(N[(N[(z0 * z0), $MachinePrecision] * (-z0)), $MachinePrecision] * 2.3703703703703702), $MachinePrecision]], $MachinePrecision]), N[(N[(N[(N[(N[(z0 - -1.5), $MachinePrecision] * z0), $MachinePrecision] - -3.0), $MachinePrecision] * z0), $MachinePrecision] - 0.8630462173553428), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z0 \leq -5.4 \cdot 10^{+101}:\\
\;\;\;\;-0.8630462173553428\\
\mathbf{elif}\;z0 \leq -0.84:\\
\;\;\;\;-\log \left(\left(\left(z0 \cdot z0\right) \cdot \left(-z0\right)\right) \cdot 2.3703703703703702\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z0 - -1.5\right) \cdot z0 - -3\right) \cdot z0 - 0.8630462173553428\\
\end{array}
if z0 < -5.4000000000000001e101Initial program 79.1%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6467.3%
Applied rewrites67.3%
Evaluated real constant67.3%
Taylor expanded in z0 around 0
Applied rewrites70.4%
if -5.4000000000000001e101 < z0 < -0.83999999999999997Initial program 79.1%
Taylor expanded in z0 around -inf
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f6432.3%
Applied rewrites32.3%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
sub-negate-revN/A
lower-neg.f64N/A
sub-flipN/A
distribute-lft-neg-outN/A
lift-log.f64N/A
log-pow-revN/A
neg-logN/A
lift-log.f64N/A
neg-logN/A
sum-logN/A
lower-log.f64N/A
lower-*.f64N/A
Applied rewrites11.5%
if -0.83999999999999997 < z0 Initial program 79.1%
lift-log.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
log-divN/A
lower-unsound--.f64N/A
Applied rewrites84.6%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f6468.4%
Applied rewrites68.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
lift-log.f64N/A
neg-logN/A
metadata-evalN/A
lift-log.f64N/A
lower--.f6467.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lower--.f6467.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.4%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval67.4%
Applied rewrites67.4%
Evaluated real constant68.4%
(FPCore (z0) :precision binary64 -0.8630462173553428)
double code(double z0) {
return -0.8630462173553428;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z0)
use fmin_fmax_functions
real(8), intent (in) :: z0
code = -0.8630462173553428d0
end function
public static double code(double z0) {
return -0.8630462173553428;
}
def code(z0): return -0.8630462173553428
function code(z0) return -0.8630462173553428 end
function tmp = code(z0) tmp = -0.8630462173553428; end
code[z0_] := -0.8630462173553428
-0.8630462173553428
Initial program 79.1%
Taylor expanded in z0 around 0
lower-+.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6467.3%
Applied rewrites67.3%
Evaluated real constant67.3%
Taylor expanded in z0 around 0
Applied rewrites70.4%
herbie shell --seed 2025250
(FPCore (z0)
:name "(log (/ -27/64 (* (* (- 1 z0) (- 1 z0)) (- z0 1))))"
:precision binary64
(log (/ -0.421875 (* (* (- 1.0 z0) (- 1.0 z0)) (- z0 1.0)))))