Clicky

Fortran Wiki
hypot (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #2 to #3: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

hypot(x,y) is the Euclidean distance function. It is equal to (削除) \\sqrt{X^2 + Y^2} (削除ここまで)(追記) X 2+Y 2\sqrt{X^2 + Y^2} (追記ここまで), without undue underflow or overflow.

Standard

Fortran 2008 and later

Class

Elemental function

Syntax

result = hypot(x, y)

Arguments

  • x - The type shall be real.
  • y - The type and kind type parameter shall be the same as x.

Return value

The return value has the same type and kind type parameter as x.

Example

program test_hypot
 real(4) :: x = 1.e0_4, y = 0.5e0_4
 x = hypot(x,y)
end program test_hypot

category: intrinsics

Revised on March 1, 2023 13:02:21 by Jason Blevins (23.245.217.121) (677 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, Fortran 2008, norm2

AltStyle によって変換されたページ (->オリジナル) /