by
Anonymous Coward
on 2018年04月06日 20時52分
(#3389468)
そのページにも、任意精度なのは四則演算だけで平方根などは32桁精度(32 digits of precision)で行われるって書いてますよ。
> Today, Calc's internal computations are done with infinite precision for basic operations (addition, subtraction, multiplication, division) and 32 digits of precision for advanced operations (square root, transcendental operators).
Specifically, it uses an arbitrary precision arithmetic library for rational operations: addition, subtraction, multiplication, division, and raising to a positive integer power. Other operations use an extended precision library that produces 32 digits of precision.
「32桁精度の浮動小数点演算」は誤訳 (スコア:0)
単精度,いわゆる float のことを言ってるんだろうけど
floatはデータサイズが32bits(つまり2進数で32桁)なだけで
32桁精度ではありません.
英文を誤訳してると思います.
Re: (スコア:2, 興味深い)
> 単精度,いわゆる float のことを言ってるんだろうけど
言ってないですよ。MSのリリースによると、電卓では四則演算と整数のべき乗以外の演算は"an extended precision library that produces 32 digits of precision"が使われているということなので、誤訳じゃないと思います。
# そもそもfloatの精度じゃ1.99999999999999999989317180305609なんて値は表現できない
Re: (スコア:0)
先頭の"1."を除けばちょうど32桁ですな。精度が高すぎるために誤差が可視化されてしまった(doubleなら丸められてた)可能性が?
Re: (スコア:0)
自己レス。やはりdoubleだと丸められますね。
PS> [double]::Parse("1.99999999999999999989317180305609")
2
doubleの10進数の精度は約16桁なので、有効桁数が2倍ということは、128-bit floating numberを使ってそうです。
Re:「32桁精度の浮動小数点演算」は誤訳 (スコア:1)
自己レス。やはりdoubleだと丸められますね。
PS> [double]::Parse("1.99999999999999999989317180305609")
2
doubleの10進数の精度は約16桁なので、有効桁数が2倍ということは、128-bit floating numberを使ってそうです。
違います。Windows98からは任意精度演算ライブラリを使っています。
https://blogs.msdn.microsoft.com/oldnewthing/20040525-00/?p=39193 [microsoft.com]
Re:「32桁精度の浮動小数点演算」は誤訳 (スコア:1)
そのページにも、任意精度なのは四則演算だけで平方根などは32桁精度(32 digits of precision)で行われるって書いてますよ。
> Today, Calc's internal computations are done with infinite precision for basic operations (addition, subtraction, multiplication, division) and 32 digits of precision for advanced operations (square root, transcendental operators).
Re:「32桁精度の浮動小数点演算」は誤訳 (スコア:1)
任意精度演算って必ずinfinite precisionである必要はないです。
必要に応じて桁数を可変できるのが任意精度です。
(あと任意精度演算の~桁精度というのはbinary64やbinary128等2進数浮動小数の~桁精度相当というものとは別です。)
現実には無限に桁を増やすのは得策ではない等の事情で桁数を制限して使っています。
下の方に同じ任意精度演算ライブラリを用いたPower Calculator PowerToyは512桁精度って書いてありますね。
Re: (スコア:0)
違うよ。それは四則演算とべき乗だけ。
https://blogs.msdn.microsoft.com/oldnewthing/20160628-00/?p=93765 [microsoft.com]
Specifically, it uses an arbitrary precision arithmetic library for rational operations: addition, subtraction, multiplication, division, and raising to a positive integer power. Other operations use an extended precision library that produces 32 digits of precision.
"extended precision"という用語は一般に浮動小数点数に使う用語(Wikipedia [wikipedia.org])だし、有効