2섬

2Sum

2Sum[1] 부동 소수점 추가 작업에서 정확한 반올림 오류를 계산하기 위한 부동 소수점 알고리즘이다.

2Sum과 그것의 변종 Fast2Sum은 Möller에 의해 1965년에 처음 출판되었다.[2]Fast2Sum은 종종 보상 합계 알고리즘과 같은 다른 알고리즘에서 암묵적으로 사용된다.[1] Kahan의 Summation 알고리즘은 1965년에 처음 출판되었고 [3]Fast2Sum은 이후 Decker에 의해 이중 이중 산술 알고리즘에 대해 1971년에 인수되었다.[4]2SumFast2Sum이라는 이름은 1997년 Shewchuk에 의해 소급 적용되었던 것으로 보인다.[5]

알고리즘.

Given two floating-point numbers and , 2Sum computes the floating-point sum and the floating-point error so that 오류 은(는) 그 자체가 부동 소수점 숫자다.

소수점 번호 , b 입력
출력 합계 = (+ ) s 오류 = +)
  1. 반환, )

부동 소수점 산술이 IEEE 754의 기본값과 같이 가장 가까운 값(어떤 방법으로든 해결된 동점)으로 정확하게 반올림되고, 합계가 넘치지 않고, 과소 흐름일 경우, + = =a + = + b라는 것을 증명할 수 있다[1][6][2]

Fast2Sum이라고 하는 2Sum의 변형은 \left }의 지수가 적어도 의 지수만큼 크다는 가정 하에 radix 2 또는 radix 3의 부동소수 연산만을 사용한다.[1][6][7][4]:

입력 radix-2 또는 radix-3 부동 소수점 b a}및 b {\중 하나 이상이 0이거나 각각 e 에 정규화된 지수를 갖는 숫자
출력 합계 = (+ ) s 오류 = +)
  1. 반환, )

조건이 충족되지 않더라도 2Sum과 Fast2Sum은 에 대한 합리적인 근사를 제공하여 s+ a product a + b 을(를) 통해 보정 합계, 도트-product 등에 대한 알고리즘이 가능하므로 입력이 정렬되지 않거나 라운딩 모드가 비정상적이더라도 오류가 낮을 수 있다.[1][2]2Sum과 Fast2Sum의 더 복잡한 변형은 라운드 투 니어티 이외의 라운딩 모드에서도 존재한다.[1]

참고 항목

참조

  1. ^ a b c d e f Muller, Jean-Michel; Brunie, Nicolas; de Dinechin, Florent; Jeannerod, Claude-Pierre; Joldes, Mioara; Lefèvre, Vincent; Melquiond, Guillaume; Revol, Nathalie; Torres, Serge (2018). Handbook of Floating-Point Arithmetic (2nd ed.). Cham, Switzerland: Birkhäuser. pp. 104–111. doi:10.1007/978-3-319-76526-6. ISBN 978-3-319-76525-9.
  2. ^ a b c Møller, Ole (March 1965). "Quasi double-precision in floating point addition". BIT Numerical Mathematics. 5: 37–50. doi:10.1007/BF01975722. S2CID 119991676.
  3. ^ Kahan, W. (January 1965). "Further remarks on reducing truncation errors". Communications of the ACM. Association for Computing Machinery. 8 (1): 40. doi:10.1145/363707.363723. ISSN 0001-0782. S2CID 22584810.
  4. ^ a b Dekker, T.J. (June 1971). "A floating-point technique for extending the available precision". Numerische Mathematik. 18 (3): 224–242. doi:10.1007/BF01397083. S2CID 63218464.
  5. ^ Shewchuk, Jonathan Richard (October 1997). "Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates". Discrete & Computational Geometry. 18 (3): 305–363. doi:10.1007/PL00009321.
  6. ^ a b Knuth, Donald E. (1998). The Art of Computer Programming, Volume II: Seminumerical Algorithms (3rd ed.). Addison–Wesley. p. 236. ISBN 978-0-201-89684-8.
  7. ^ Sterbenz, Pat H. (1974). Floating-Point Computation. Englewood Cliffs, NJ, United States: Prentice-Hall. pp. 138–143. ISBN 0-13-322495-3.