Raku의 atanh — 아크탄젠트 하이퍼볼릭(arctangent hyperbolicus)

Raku의 atanh — 아크탄젠트 하이퍼볼릭(arctangent hyperbolicus)

atan이 삼각함수 탄젠트의 역함수였다면, atanh는 하이퍼볼릭 탄젠트(tanh)의 역함수예요. 쌍곡선 함수 계열의 하나로, 특정 계산에서 자주 등장해요.

sub atanh(Numeric(Cool))
method atanh()

invocant(서브 형식에서는 인자)를 Numeric으로 강제한 뒤, 그 값의 아크탄젠트 하이퍼볼릭(Inverse tangent hyperbolicus)을 돌려줘요.

say atanh(0.5);  # OUTPUT: «0.549306144334055␤»

출처: Raku 공식 문서 — atanh

본문

  • 서브 형식 atanh(Numeric(Cool))은 인자를, 메서드 형식 atanh()은 invocant를 Numeric으로 강제해요.
  • 하이퍼볼릭 탄젠트(tanh)의 역함수 값을 돌려줘요.
  • Cool 타입의 값을 인자로 받아 Numeric으로 풀어서 계산해요.