Hyperbolic tangent

Specification

?
\[\mathsf{TRUE}\left(\right)\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{-x}\\ \frac{e^{x} - t\_0}{e^{x} + t\_0} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (exp (- x)))) (/ (- (exp x) t_0) (+ (exp x) t_0))))
double code(double x) {
	double t_0 = exp(-x);
	return (exp(x) - t_0) / (exp(x) + t_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(x)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8) :: t_0
    t_0 = exp(-x)
    code = (exp(x) - t_0) / (exp(x) + t_0)
end function
public static double code(double x) {
	double t_0 = Math.exp(-x);
	return (Math.exp(x) - t_0) / (Math.exp(x) + t_0);
}
def code(x):
	t_0 = math.exp(-x)
	return (math.exp(x) - t_0) / (math.exp(x) + t_0)
function code(x)
	t_0 = exp(Float64(-x))
	return Float64(Float64(exp(x) - t_0) / Float64(exp(x) + t_0))
end
function tmp = code(x)
	t_0 = exp(-x);
	tmp = (exp(x) - t_0) / (exp(x) + t_0);
end
code[x_] := Block[{t$95$0 = N[Exp[(-x)], $MachinePrecision]}, N[(N[(N[Exp[x], $MachinePrecision] - t$95$0), $MachinePrecision] / N[(N[Exp[x], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{-x}\\
\frac{e^{x} - t\_0}{e^{x} + t\_0}
\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025052 
(FPCore (x)
  :name "Hyperbolic tangent"
  :precision binary64
  :pre (TRUE)
  (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))))

Please file a bug report with this information.

Backtrace

egglog executable not found in PATHLC
run-egglog-multi-extractor/home/nightlies/herbie/aditya-egglog-develop-2/src/core/egglog-herbie.rkt1480
simplify-batch/home/nightlies/herbie/aditya-egglog-develop-2/src/core/simplify.rkt200
(unnamed)/usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt48618
initial-simplify/home/nightlies/herbie/aditya-egglog-develop-2/src/core/preprocess.rkt560
find-preprocessing/home/nightlies/herbie/aditya-egglog-develop-2/src/core/preprocess.rkt830
run-improve!/home/nightlies/herbie/aditya-egglog-develop-2/src/core/mainloop.rkt440
get-alternatives/report/home/nightlies/herbie/aditya-egglog-develop-2/src/api/sandbox.rkt1740
(unnamed)/home/nightlies/herbie/aditya-egglog-develop-2/src/api/sandbox.rkt2656
(unnamed)/usr/share/racket/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/share/racket/pkgs/profile-lib/main.rkt90
in-engine/home/nightlies/herbie/aditya-egglog-develop-2/src/api/sandbox.rkt2832
(unnamed)/usr/share/racket/collects/racket/engine.rkt4224