Floating-Point Arithmetic
abbr. FP
floating point number abbr. FPN
abbr. FP
floating point number abbr. FPN
구성
- 부호,sign indicator
- 지수,exponent - curr. see 지수,exponentiation
- 가수,mantissa - tmp: https://everything2.com/title/mantissa https://foldoc.org/mantissa
- fp16 half precision
- fp32 single precision
- fp64 double precision // Double-precision_floating-point_format
- fp80 extended precision, etc. // Extended_precision // double-extended라고도 하는 듯?
- single precision floating point - 단정도 (정도는 정밀도를 줄인 말인가?)
- double precision floating point - 배정도
- Google BFloat16 (exponent범위가 fp16보다 넓다)
- NVIDIA TensorFloat
- Automatic mixed precision (AMP)
- Microsoft Binary Format (MBF) - historic
- Minifloat
- FP11 - historic (for PDP-11) https://gunkies.org/wiki/FP11_floating_point
소수점 밑 첫째 자리가 0이 아닌 수가 나오도록 하는 것이 저장에 효율적 - 정규화,normalization
계산하는 장치는 FPU. floating_point_unit / floating-point_unit
부동소수점장치,floating-point_unit,FPU
{
floating point unit, FPU, 부동소수점장치
계산하는 장치는 FPU. floating_point_unit / floating-point_unit
부동소수점장치,floating-point_unit,FPU
{
floating point unit, FPU, 부동소수점장치
}
연산 결과가 항상 참값이 아니며 근사,approximation값일 수 있음. 대개의 경우? CHK. 약간의 오차,error가 있을 때가 많음.
ex. 0.1 + 0.2 = 0.30000000000000004
https://0.30000000000000004.com/ (PL별 결과)
via: https://johngrib.github.io/blog/2017/08/23/0.30000000000000004/
ex. 0.1 + 0.2 = 0.30000000000000004
https://0.30000000000000004.com/ (PL별 결과)
via: https://johngrib.github.io/blog/2017/08/23/0.30000000000000004/
따라서 비교,comparison 연산에 주의를 기울여야 한다, 특히 등호를 쓰는 ... (상등? 동등? equality? equivalence? equality_operator or equality_operation? rel: 동치관계,equivalence_relation? equals? 아무튼 C/C++ 유래 PL 문법에서 == and != 를 쓰는 그 연산) 을 할 때.
관련links tmp
{
https://everything2.com/title/floating-point comparison
아주 약간의 오차,error (machine_epsilon를 사용? - 작성중) 를 무시하는 식으로 - 약간의 차이가 있어도 같다고 - 해야 함.
}
관련links tmp
{
https://everything2.com/title/floating-point comparison
아주 약간의 오차,error (machine_epsilon를 사용? - 작성중) 를 무시하는 식으로 - 약간의 차이가 있어도 같다고 - 해야 함.
}
rel
구간산술,interval_arithmetic - 과 분명 겹치는 내용 있다
수치해석,numerical_analysis - 을 하기 위해선 컴퓨터가 수 다루는 방식에 대한 이해가 필수적이다
구간산술,interval_arithmetic - 과 분명 겹치는 내용 있다
수치해석,numerical_analysis - 을 하기 위해선 컴퓨터가 수 다루는 방식에 대한 이해가 필수적이다
이것들에 대한 독립 pagename은 아마도 floating-point arithmetic ?
부동소수점 산술
floating point arithmetic
floating point arithmetic
rel? : 산술,arithmetic
부동소수점 산술
floating point arithmetic
floating point arithmetic
rel? : 산술,arithmetic
부동소수점 산술 FPA ¶
부동소수점 수 FPN ¶
여기서 다루는 수,number ... 페이지 커지면 이것도 아마 독립 필요 할수도 안할수도
부동소수점수,floating-point_number FPN
{
여기엔 다른 컴퓨터가 다루는 수 형식들을 비교하면 좋은? as coordinate terms ...제일 간단한 integer부터
Up: 수,number
}
부동소수점수,floating-point_number FPN
{
여기엔 다른 컴퓨터가 다루는 수 형식들을 비교하면 좋은? as coordinate terms ...제일 간단한 integer부터
Up: 수,number
}
floating point unit, FPU ¶
이걸 처리하는 장치, 옛날에는 CPU 밖에 코프로세서,coprocessor로 별도로 있었고, 현재는 대체로 CPU 내에 통합되어 있는
GPGPU를 한다면 GPU에도 대량으로 존재하는 것을 이제 ML등 여러 용도로 많이 쓰는....
GPGPU를 한다면 GPU에도 대량으로 존재하는 것을 이제 ML등 여러 용도로 많이 쓰는....
// Up: 장치,unit 만들까?
seealso ¶
Not_a_number,NaN
수치해석,numerical_analysis
유리수,rational_number
점,point esp decimal_point 였나?? 암튼 기하학의 점 그런거 말고
포화산술,saturation_arithmetic 나중에
수치해석,numerical_analysis
유리수,rational_number
점,point esp decimal_point 였나?? 암튼 기하학의 점 그런거 말고
포화산술,saturation_arithmetic 나중에
자바 책에서 ¶
float | approximately 10-38 to 1038 | 7 significant digits |
double | approximately 10-308 to 10308 | 15 significant digits |
Ref. ¶
http://mathworld.wolfram.com/Floating-PointArithmetic.html
http://mathworld.wolfram.com/Floating-PointAlgebra.html
http://mathworld.wolfram.com/Floating-PointNumber.html
floating point arithmetic
http://mathworld.wolfram.com/Floating-PointAlgebra.html
http://mathworld.wolfram.com/Floating-PointNumber.html
floating point arithmetic
Half-Precision Floating-Point, Visualized
https://observablehq.com/@rreusser/half-precision-floating-point-visualized
설명하는 그림/그래프는 마우스 휠로 줌 인/아웃 가능.
https://observablehq.com/@rreusser/half-precision-floating-point-visualized
설명하는 그림/그래프는 마우스 휠로 줌 인/아웃 가능.
PL별 syntax: FP literal ¶
Compare:
{
floating point number/arithmetic(curr. 부동소수점,floating_point)과 비교하여 장단점
fixed point : 부호 1 bit + 나머지 integer part - 두 부분으로 이루어짐. (소수점의 위치는 어딘가로 fixed)
floating point : 부호 1 bit + 유효숫자?를 나타내는 가수부(mantissa) + 소수점의 위치를 나타내는 지수부 - 세 부분으로 이루어짐.
{
arbitrary-precision arithmetic, bignum arithmetic, multiple-precision arithmetic, infinite-precision arithmetic (wpen)
{
floating point number/arithmetic(curr. 부동소수점,floating_point)과 비교하여 장단점
- less flexible (당연히, 고정되어 있으므로) → 표현 가능 수 범위가 좁은.
- ...또 뭐있지? 구현하기 간단한 거?
fixed point : 부호 1 bit + 나머지 integer part - 두 부분으로 이루어짐. (소수점의 위치는 어딘가로 fixed)
floating point : 부호 1 bit + 유효숫자?를 나타내는 가수부(mantissa) + 소수점의 위치를 나타내는 지수부 - 세 부분으로 이루어짐.
비트 배열 순서는 보통 부호 | 지수부 | 가수부 순.
(cf. 보통 사람이 쓰는 표기 순서는 보통 부호 | 가수부 | 지수부 순.)
}(cf. 보통 사람이 쓰는 표기 순서는 보통 부호 | 가수부 | 지수부 순.)
{
arbitrary-precision arithmetic, bignum arithmetic, multiple-precision arithmetic, infinite-precision arithmetic (wpen)
compare bigint.
Twins:
https://foldoc.org/floating-point
https://mathworld.wolfram.com/Floating-PointRepresentation.html
https://mathworld.wolfram.com/Floating-PointAlgebra.html
https://mathworld.wolfram.com/Floating-PointNumber.html
https://everything2.com/title/Floating point
https://everything2.com/title/Floating point multiplication
https://everything2.com/title/Floating point operation
https://everything2.com/title/IEEE 754
https://foldoc.org/floating-point
https://mathworld.wolfram.com/Floating-PointRepresentation.html
https://mathworld.wolfram.com/Floating-PointAlgebra.html
https://mathworld.wolfram.com/Floating-PointNumber.html
https://everything2.com/title/Floating point
https://everything2.com/title/Floating point multiplication
https://everything2.com/title/Floating point operation
https://everything2.com/title/IEEE 754