Number.st
changeset 19768 55e36a939e1e
parent 19702 79ea925e1f35
child 19769 57962c690836
equal deleted inserted replaced
19767:2647abae8b3c 19768:55e36a939e1e
  2473         ^ self asFloat arcCos.
  2473         ^ self asFloat arcCos.
  2474     ].
  2474     ].
  2475     ^ (self class pi / 2) - self arcSin
  2475     ^ (self class pi / 2) - self arcSin
  2476 !
  2476 !
  2477 
  2477 
       
  2478 arcCosech
       
  2479     "return the inverse hyperbolic cosecant of the receiver."
       
  2480 
       
  2481     (self isLimitedPrecisionReal not
       
  2482     or:[self generality < 1.0 generality]) ifTrue:[
       
  2483         ^ self asFloat arcCosech.
       
  2484     ].
       
  2485     ^ ((1 + ((self*self)+1) sqrt) / self) ln
       
  2486 !
       
  2487 
  2478 arcCosh
  2488 arcCosh
  2479     "return the hyperbolic arccosine of the receiver."
  2489     "return the inverse hyperbolic cosine of the receiver."
  2480 
  2490 
  2481     (self isLimitedPrecisionReal not
  2491     (self isLimitedPrecisionReal not
  2482     or:[self generality < 1.0 generality]) ifTrue:[
  2492     or:[self generality < 1.0 generality]) ifTrue:[
  2483         ^ self asFloat arcCosh.
  2493         ^ self asFloat arcCosh.
  2484     ].
  2494     ].
  2485     ^ (self + (self*self-1) sqrt) ln.
  2495     ^ (self + (self*self-1) sqrt) ln.
  2486 !
  2496 !
  2487 
  2497 
       
  2498 arcCoth
       
  2499     "return the inverse hyperbolic cotangent of the receiver."
       
  2500 
       
  2501     (self isLimitedPrecisionReal not
       
  2502     or:[self generality < 1.0 generality]) ifTrue:[
       
  2503         ^ self asFloat arcCoth.
       
  2504     ].
       
  2505     ^ ((self+1) / (self-1)) ln / 2
       
  2506 !
       
  2507 
       
  2508 arcSech
       
  2509     "return the inverse hyperbolic secant of the receiver."
       
  2510 
       
  2511     (self isLimitedPrecisionReal not
       
  2512     or:[self generality < 1.0 generality]) ifTrue:[
       
  2513         ^ self asFloat arcSech.
       
  2514     ].
       
  2515     ^ ((1 + (1-(self*self)) sqrt) / self) ln
       
  2516 !
       
  2517 
  2488 arcSin
  2518 arcSin
  2489     "return the arcsine of the receiver (in radians)"
  2519     "return the arcsine of the receiver (in radians)"
  2490 
  2520 
  2491     (self isLimitedPrecisionReal not
  2521     (self isLimitedPrecisionReal not
  2492     or:[self generality < 1.0 generality]) ifTrue:[
  2522     or:[self generality < 1.0 generality]) ifTrue:[
  2494     ].
  2524     ].
  2495     ^ self arcSin_withAccuracy:self epsilon
  2525     ^ self arcSin_withAccuracy:self epsilon
  2496 !
  2526 !
  2497 
  2527 
  2498 arcSinh
  2528 arcSinh
  2499     "return the hyperbolic arcsine of the receiver."
  2529     "return the inverse hyperbolic sine of the receiver."
  2500 
  2530 
  2501     (self isLimitedPrecisionReal not
  2531     (self isLimitedPrecisionReal not
  2502     or:[self generality < 1.0 generality]) ifTrue:[
  2532     or:[self generality < 1.0 generality]) ifTrue:[
  2503         ^ self asFloat arcSinh.
  2533         ^ self asFloat arcSinh.
  2504     ].
  2534     ].
  2525     ].
  2555     ].
  2526     ^ self arcTan2_withAccuracy:self epsilon x:x
  2556     ^ self arcTan2_withAccuracy:self epsilon x:x
  2527 !
  2557 !
  2528 
  2558 
  2529 arcTanh
  2559 arcTanh
  2530     "return the hyperbolic arctangent of the receiver."
  2560     "return the inverse hyperbolic tangent of the receiver."
  2531 
  2561 
  2532     (self isLimitedPrecisionReal not
  2562     (self isLimitedPrecisionReal not
  2533     or:[self generality < 1.0 generality]) ifTrue:[
  2563     or:[self generality < 1.0 generality]) ifTrue:[
  2534         ^ self asFloat arcTanh.
  2564         ^ self asFloat arcTanh.
  2535     ].
  2565     ].
  2536     ^ ((self + 1) ln / 2) - ((1 - self) ln / 2)
  2566     ^ ((1 + self) / (1 - self)) ln / 2
       
  2567     "/ s^ ((1 + self) ln / 2) - ((1 - self) ln / 2)
  2537 !
  2568 !
  2538 
  2569 
  2539 cos
  2570 cos
  2540     "return the cosine of the receiver (interpreted as radians)"
  2571     "return the cosine of the receiver (interpreted as radians)"
  2541 
  2572