Math.Tanh メソッドとは? わかりやすく解説

Math.Tanh メソッド

指定され角度ハイパーボリック タンジェント返します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説

角度 value は、ラジアンで示す必要がありますπ/180 を乗算して、度をラジアン変換します

使用例使用例

次に示すのは、Tanh使用して選択した値からハイパーボリック タンジェント恒等式求める例です。

' Example for the hyperbolic Math.Tanh( Double ) method.
Imports System
Imports Microsoft.VisualBasic

Module DemoTanh
   
    Sub Main()
        Console.WriteLine( _
            "This example of hyperbolic Math.Tanh( Double )"
 & _
            vbCrLf & "generates the following output.")
        Console.WriteLine( _
            vbCrLf & "Evaluate these hyperbolic "
 & _
            "identities with selected values for X:")
        Console.WriteLine("   tanh(X) = sinh(X) / cosh(X)")
        Console.WriteLine("   tanh(2 * X) = 2 * tanh(X) / (1 +
 tanh^2(X))")
          
        UseTanh(0.1)
        UseTanh(1.2)
        UseTanh(4.9)
          
        Console.WriteLine( _
            vbCrLf & "Evaluate [tanh(X + Y) == (tanh(X) +
 " & _
            "tanh(Y)) / (1 + tanh(X) * tanh(Y))]"
 & _
            vbCrLf & "with selected values for X and Y:")

        UseTwoArgs(0.1, 1.2)
        UseTwoArgs(1.2, 4.9)
    End Sub 'Main
       
    ' Evaluate hyperbolic identities with a given argument.
    Sub UseTanh(arg As Double)
        Dim tanhArg As Double
 = Math.Tanh(arg)
          
        ' Evaluate tanh(X) = sinh(X) / cosh(X).
        Console.WriteLine( _
            vbCrLf & "                       Math.Tanh({0})
 = {1:E16}" & _
            vbCrLf & "      Math.Sinh({0}) / Math.Cosh({0})
 = {2:E16}", _
            arg, tanhArg, Math.Sinh(arg) / Math.Cosh(arg))
          
        ' Evaluate tanh(2 * X) = 2 * tanh(X) / (1 + tanh^2(X)).
        Console.WriteLine( _
            "                   2 * Math.Tanh({0}) /",
 _
            arg, 2.0 * tanhArg)
        Console.WriteLine( _
            "             (1 + (Math.Tanh({0}))^2) = {1:E16}",
 _
            arg, 2.0 * tanhArg /(1.0 + tanhArg * tanhArg))
        Console.WriteLine( _
            "                       Math.Tanh({0}) = {1:E16}",
 _
            2.0 * arg, Math.Tanh((2.0 * arg)))
    End Sub 'UseTanh
       
    ' Evaluate a hyperbolic identity that is a function of two arguments.
    Sub UseTwoArgs(argX As Double,
 argY As Double)

        ' Evaluate tanh(X + Y) = (tanh(X) + tanh(Y)) / (1 + tanh(X)
 * tanh(Y)).
        Console.WriteLine( _
            vbCrLf & "    (Math.Tanh({0}) + Math.Tanh({1}))
 /" & _
            vbCrLf & "(1 + Math.Tanh({0}) * Math.Tanh({1}))
 = {2:E16}", _
            argX, argY, (Math.Tanh(argX) + Math.Tanh(argY)) / _
            (1.0 + Math.Tanh(argX) * Math.Tanh(argY)))
        Console.WriteLine( _
            "                       Math.Tanh({0}) = {1:E16}",
 _
            argX + argY, Math.Tanh(argX + argY))

    End Sub 'UseTwoArgs
End Module 'DemoTanh

' This example of hyperbolic Math.Tanh( Double )
' generates the following output.
' 
' Evaluate these hyperbolic identities with selected values for X:
'    tanh(X) = sinh(X) / cosh(X)
'    tanh(2 * X) = 2 * tanh(X) / (1 + tanh^2(X))
' 
'                        Math.Tanh(0.1) = 9.9667994624955819E-002
'       Math.Sinh(0.1) / Math.Cosh(0.1) = 9.9667994624955819E-002
'                    2 * Math.Tanh(0.1) /
'              (1 + (Math.Tanh(0.1))^2) = 1.9737532022490401E-001
'                        Math.Tanh(0.2) = 1.9737532022490401E-001
' 
'                        Math.Tanh(1.2) = 8.3365460701215521E-001
'       Math.Sinh(1.2) / Math.Cosh(1.2) = 8.3365460701215521E-001
'                    2 * Math.Tanh(1.2) /
'              (1 + (Math.Tanh(1.2))^2) = 9.8367485769368024E-001
'                        Math.Tanh(2.4) = 9.8367485769368024E-001
' 
'                        Math.Tanh(4.9) = 9.9988910295055444E-001
'       Math.Sinh(4.9) / Math.Cosh(4.9) = 9.9988910295055433E-001
'                    2 * Math.Tanh(4.9) /
'              (1 + (Math.Tanh(4.9))^2) = 9.9999999385024030E-001
'                        Math.Tanh(9.8) = 9.9999999385024030E-001
' 
' Evaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y))]
' with selected values for X and Y:
' 
'     (Math.Tanh(0.1) + Math.Tanh(1.2)) /
' (1 + Math.Tanh(0.1) * Math.Tanh(1.2)) = 8.6172315931330645E-001
'                        Math.Tanh(1.3) = 8.6172315931330634E-001
' 
'     (Math.Tanh(1.2) + Math.Tanh(4.9)) /
' (1 + Math.Tanh(1.2) * Math.Tanh(4.9)) = 9.9998993913939649E-001
'                        Math.Tanh(6.1) = 9.9998993913939649E-001
// Example for the hyperbolic Math.Tanh( double ) method.
using System;

class DemoTanh 
{
    public static void Main()
 
    {
        Console.WriteLine( 
            "This example of hyperbolic Math.Tanh( double )\n" +
            "generates the following output." );
        Console.WriteLine( 
            "\nEvaluate these hyperbolic identities " +
            "with selected values for X:" );
        Console.WriteLine( "   tanh(X) == sinh(X) / cosh(X)" );
        Console.WriteLine( 
            "   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))" );

        UseTanh(0.1);
        UseTanh(1.2);
        UseTanh(4.9);

        Console.WriteLine( 
            "\nEvaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) " +
            "/ (1 + tanh(X) * tanh(Y))]" +
            "\nwith selected values for X and Y:" );

        UseTwoArgs(0.1, 1.2);
        UseTwoArgs(1.2, 4.9);
    }

    // Evaluate hyperbolic identities with a given argument.
    static void UseTanh(double arg)
    {
        double tanhArg = Math.Tanh(arg);

        // Evaluate tanh(X) == sinh(X) / cosh(X).
        Console.WriteLine( 
            "\n                       Math.Tanh({0}) == {1:E16}\n" +
            "      Math.Sinh({0}) / Math.Cosh({0}) == {2:E16}",
            arg, tanhArg, (Math.Sinh(arg) / Math.Cosh(arg)) );

        // Evaluate tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X)).
        Console.WriteLine( 
            "                   2 * Math.Tanh({0}) /", 
            arg, 2.0 * tanhArg );
        Console.WriteLine( 
            "             (1 + (Math.Tanh({0}))^2) == {1:E16}", 
            arg, 2.0 * tanhArg / (1.0 + tanhArg * tanhArg ) );
        Console.WriteLine( 
            "                       Math.Tanh({0}) == {1:E16}", 
            2.0 * arg, Math.Tanh(2.0 * arg) );
    }

    // Evaluate a hyperbolic identity that is a function of two arguments.
    static void UseTwoArgs(double argX, double
 argY)
    {
        // Evaluate tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X)
 * tanh(Y)).
        Console.WriteLine( 
            "\n    (Math.Tanh({0}) + Math.Tanh({1})) /\n" + 
            "(1 + Math.Tanh({0}) * Math.Tanh({1})) == {2:E16}", 
            argX, argY, (Math.Tanh(argX) + Math.Tanh(argY)) /
            (1.0 + Math.Tanh(argX) * Math.Tanh(argY)) );
        Console.WriteLine( 
            "                       Math.Tanh({0}) == {1:E16}",
            argX + argY, Math.Tanh(argX + argY));
    }
}

/*
This example of hyperbolic Math.Tanh( double )
generates the following output.

Evaluate these hyperbolic identities with selected values for
 X:
   tanh(X) == sinh(X) / cosh(X)
   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))

                       Math.Tanh(0.1) == 9.9667994624955819E-002
      Math.Sinh(0.1) / Math.Cosh(0.1) == 9.9667994624955819E-002
                   2 * Math.Tanh(0.1) /
             (1 + (Math.Tanh(0.1))^2) == 1.9737532022490401E-001
                       Math.Tanh(0.2) == 1.9737532022490401E-001

                       Math.Tanh(1.2) == 8.3365460701215521E-001
      Math.Sinh(1.2) / Math.Cosh(1.2) == 8.3365460701215521E-001
                   2 * Math.Tanh(1.2) /
             (1 + (Math.Tanh(1.2))^2) == 9.8367485769368024E-001
                       Math.Tanh(2.4) == 9.8367485769368024E-001

                       Math.Tanh(4.9) == 9.9988910295055444E-001
      Math.Sinh(4.9) / Math.Cosh(4.9) == 9.9988910295055433E-001
                   2 * Math.Tanh(4.9) /
             (1 + (Math.Tanh(4.9))^2) == 9.9999999385024030E-001
                       Math.Tanh(9.8) == 9.9999999385024030E-001

Evaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y))]
with selected values for X and Y:

    (Math.Tanh(0.1) + Math.Tanh(1.2)) /
(1 + Math.Tanh(0.1) * Math.Tanh(1.2)) == 8.6172315931330645E-001
                       Math.Tanh(1.3) == 8.6172315931330634E-001

    (Math.Tanh(1.2) + Math.Tanh(4.9)) /
(1 + Math.Tanh(1.2) * Math.Tanh(4.9)) == 9.9998993913939649E-001
                       Math.Tanh(6.1) == 9.9998993913939649E-001
*/
// Example for the hyperbolic Math::Tanh( double ) method.
using namespace System;

// Evaluate hyperbolic identities with a given argument.
void UseTanh( double arg )
{
   double tanhArg = Math::Tanh( arg );
   
   // Evaluate tanh(X) == sinh(X) / cosh(X).
   Console::WriteLine( "\n                        Math::Tanh({0}) == {1:E16}\n"
   "      Math::Sinh({0}) / Math::Cosh({0}) == {2:E16}", arg, tanhArg,
 (Math::Sinh( arg ) / Math::Cosh( arg )) );
   
   // Evaluate tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X)).
   Console::WriteLine( "                    2 * Math::Tanh({0}) /", arg,
 2.0 * tanhArg );
   Console::WriteLine( "              (1 + (Math::Tanh({0}))^2) == {1:E16}",
 arg, 2.0 * tanhArg / (1.0 + tanhArg * tanhArg) );
   Console::WriteLine( "                        Math::Tanh({0}) == {1:E16}",
 2.0 * arg, Math::Tanh( 2.0 * arg ) );
}


// Evaluate a hyperbolic identity that is a function of two arguments.
void UseTwoArgs( double argX, double argY )
{
   
   // Evaluate tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y)).
   Console::WriteLine( "\n    (Math::Tanh({0}) + Math::Tanh({1})) /\n"
   "(1 + Math::Tanh({0}) * Math::Tanh({1})) == {2:E16}", argX, argY, (Math::Tanh(
 argX ) + Math::Tanh( argY )) / (1.0 + Math::Tanh( argX ) * Math::Tanh( argY ))
 );
   Console::WriteLine( "                        Math::Tanh({0}) == {1:E16}",
 argX + argY, Math::Tanh( argX + argY ) );
}

int main()
{
   Console::WriteLine( "This example of hyperbolic Math::Tanh( double )\n"
   "generates the following output." );
   Console::WriteLine( "\nEvaluate these hyperbolic identities "
   "with selected values for X:" );
   Console::WriteLine( "   tanh(X) == sinh(X) / cosh(X)" );
   Console::WriteLine( "   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))"
 );
   UseTanh( 0.1 );
   UseTanh( 1.2 );
   UseTanh( 4.9 );
   Console::WriteLine( "\nEvaluate [tanh(X + Y) == "
   "(tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y))]"
   "\nwith selected values for X and Y:" );
   UseTwoArgs( 0.1, 1.2 );
   UseTwoArgs( 1.2, 4.9 );
}

/*
This example of hyperbolic Math::Tanh( double )
generates the following output.

Evaluate these hyperbolic identities with selected values for
 X:
   tanh(X) == sinh(X) / cosh(X)
   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))

                        Math::Tanh(0.1) == 9.9667994624955819E-002
      Math::Sinh(0.1) / Math::Cosh(0.1) == 9.9667994624955819E-002
                    2 * Math::Tanh(0.1) /
              (1 + (Math::Tanh(0.1))^2) == 1.9737532022490401E-001
                        Math::Tanh(0.2) == 1.9737532022490401E-001

                        Math::Tanh(1.2) == 8.3365460701215521E-001
      Math::Sinh(1.2) / Math::Cosh(1.2) == 8.3365460701215521E-001
                    2 * Math::Tanh(1.2) /
              (1 + (Math::Tanh(1.2))^2) == 9.8367485769368024E-001
                        Math::Tanh(2.4) == 9.8367485769368024E-001

                        Math::Tanh(4.9) == 9.9988910295055444E-001
      Math::Sinh(4.9) / Math::Cosh(4.9) == 9.9988910295055433E-001
                    2 * Math::Tanh(4.9) /
              (1 + (Math::Tanh(4.9))^2) == 9.9999999385024030E-001
                        Math::Tanh(9.8) == 9.9999999385024030E-001

Evaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y))]
with selected values for X and Y:

    (Math::Tanh(0.1) + Math::Tanh(1.2)) /
(1 + Math::Tanh(0.1) * Math::Tanh(1.2)) == 8.6172315931330645E-001
                        Math::Tanh(1.3) == 8.6172315931330634E-001

    (Math::Tanh(1.2) + Math::Tanh(4.9)) /
(1 + Math::Tanh(1.2) * Math::Tanh(4.9)) == 9.9998993913939649E-001
                        Math::Tanh(6.1) == 9.9998993913939649E-001
*/
// Example for the hyperbolic Math.Tanh( double ) method.
import System.*;

class DemoTanh
{
    public static void main(String[]
 args)
    {
        Console.WriteLine(("This example of hyperbolic Math.Tanh( double )\n"
 
            + "generates the following output."));
        Console.WriteLine(
            ("\nEvaluate these hyperbolic identities " 
            + "with selected values for X:"));
        Console.WriteLine("   tanh(X) == sinh(X) / cosh(X)");
        Console.WriteLine("   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))");
        UseTanh(0.1);
        UseTanh(1.2);
        UseTanh(4.9);
        Console.WriteLine(
            ("\nEvaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) " 
            + "/ (1 + tanh(X) * tanh(Y))]" 
            + "\nwith selected values for X and Y:"));
        UseTwoArgs(0.1, 1.2);
        UseTwoArgs(1.2, 4.9);
    } //main
      
    // Evaluate hyperbolic identities with a given argument.
    static void UseTanh(double arg) 
    {
        double tanhArg = System.Math.Tanh(arg);

        // Evaluate tanh(X) == sinh(X) / cosh(X).
        Console.WriteLine(
            "\n                       Math.Tanh({0}) == {1}\n" 
            + "      Math.Sinh({0}) / Math.Cosh({0}) == {2}", 
            System.Convert.ToString(arg),  
            ((System.Double)(tanhArg)).ToString("E16"), 
            ((System.Double)(System.Math.Sinh(arg) / 
            System.Math.Cosh(arg))).ToString("E16"));

        // Evaluate tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X)).
        Console.WriteLine(
            "                   2 * Math.Tanh({0}) /",
            System.Convert.ToString(arg), 
            ((System.Double)(2.0 * tanhArg)).ToString("E16"));
        Console.WriteLine(
            "             (1 + (Math.Tanh({0}))^2) == {1}", 
            System.Convert.ToString(arg),((System.Double)( 2.0 * tanhArg /      
      
            (1.0 + tanhArg * tanhArg))).ToString("E16"));
        Console.WriteLine(
            "                       Math.Tanh({0}) == {1}", 
            System.Convert.ToString(2.0 * arg), 
            ((System.Double)( System.Math.Tanh((2.0 * arg)))).ToString("E16"));
    } //UseTanh

    // Evaluate a hyperbolic identity that is a function of two arguments.
    static void UseTwoArgs(double argX, double
 argY)
    {
        // Evaluate tanh(X + Y) == 
        // (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y)).
        Console.WriteLine(
            "\n    (Math.Tanh({0}) + Math.Tanh({1})) /\n" 
            + "(1 + Math.Tanh({0}) * Math.Tanh({1})) == {2}", 
            System.Convert.ToString(argX), 
            System.Convert.ToString(argY),
            ((System.Double) ((System.Math.Tanh(argX) 
            + System.Math.Tanh(argY)) / (1.0 + System.Math.Tanh(argX)           
 
            * System.Math.Tanh(argY)))).ToString("E16"));
        Console.WriteLine(
            "                       Math.Tanh({0}) == {1}", 
            System.Convert.ToString (argX + argY),((System.Double)(            
            System.Math.Tanh((argX + argY)))).ToString("E16"));
    } //UseTwoArgs
} //DemoTanh

/*
This example of hyperbolic Math.Tanh( double )
generates the following output.

Evaluate these hyperbolic identities with selected values for
 X:
   tanh(X) == sinh(X) / cosh(X)
   tanh(2 * X) == 2 * tanh(X) / (1 + tanh^2(X))

                       Math.Tanh(0.1) == 9.9667994624955819E-002
      Math.Sinh(0.1) / Math.Cosh(0.1) == 9.9667994624955819E-002
                   2 * Math.Tanh(0.1) /
             (1 + (Math.Tanh(0.1))^2) == 1.9737532022490401E-001
                       Math.Tanh(0.2) == 1.9737532022490401E-001

                       Math.Tanh(1.2) == 8.3365460701215521E-001
      Math.Sinh(1.2) / Math.Cosh(1.2) == 8.3365460701215521E-001
                   2 * Math.Tanh(1.2) /
             (1 + (Math.Tanh(1.2))^2) == 9.8367485769368024E-001
                       Math.Tanh(2.4) == 9.8367485769368024E-001

                       Math.Tanh(4.9) == 9.9988910295055444E-001
      Math.Sinh(4.9) / Math.Cosh(4.9) == 9.9988910295055433E-001
                   2 * Math.Tanh(4.9) /
             (1 + (Math.Tanh(4.9))^2) == 9.9999999385024030E-001
                       Math.Tanh(9.8) == 9.9999999385024030E-001

Evaluate [tanh(X + Y) == (tanh(X) + tanh(Y)) / (1 + tanh(X) * tanh(Y))]
with selected values for X and Y:

    (Math.Tanh(0.1) + Math.Tanh(1.2)) /
(1 + Math.Tanh(0.1) * Math.Tanh(1.2)) == 8.6172315931330645E-001
                       Math.Tanh(1.3) == 8.6172315931330634E-001

    (Math.Tanh(1.2) + Math.Tanh(4.9)) /
(1 + Math.Tanh(1.2) * Math.Tanh(4.9)) == 9.9998993913939649E-001
                       Math.Tanh(6.1) == 9.9998993913939649E-001
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からMath.Tanh メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からMath.Tanh メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMath.Tanh メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Math.Tanh メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Math.Tanh メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS