-
Notifications
You must be signed in to change notification settings - Fork 94
tanh
Ryzom Core Wiki edited this page Jul 8, 2024
·
2 revisions
title: Tanh description: published: true date: 2023-03-16T23:12:35.187Z tags: editor: markdown dateCreated: 2023-03-16T22:30:42.860Z
The tanh native AI script function returns the hyperbolic tangent of the input value.
(y: f)tanh(x: f) // tanh_f_f
- x (float): A real value.
-
y (float): The hyperbolic tangent of
x
.
(y)tanh(0.5);
This example code calculates the hyperbolic tangent of 0.5
and stores the result in the variable y
.
The hyperbolic tangent is defined as tanh(x) = (e^x - e^-x) / (e^x + e^-x)
. The tanh
function is a mathematical function that is commonly used in statistics, signal processing, and other fields.
This function can be used in combination with other native AI script functions to perform complex mathematical calculations.