wcalcが整数演算(減算)の丸め記号(〜=)を出力するのはなぜですか?

wcalcが整数演算(減算)の丸め記号(〜=)を出力するのはなぜですか?

私はman wcalcそれが次のように言うことを見つけました。

       --ints
           Toggles whether long integers will be abbreviated or not.  This  conflicts  with  engineering
           notation for large numbers, but not for decimals.

...

Rounding in the command-line version is denoted by a  tilde  before  the  equals  sign  (~=). 

だから私はこれを試しました:

$ wcalc --version
wcalc 2.5

$ wcalc 1588890124670286510-1588890124626020545
~= 4.4266e+07

いいですね。予想通り、科学的表記法で表されます。

$ wcalc --ints 1588890124670286510-1588890124626020545
~= 44265965

したがって、期待どおりに整数として表示されますが、何らかの理由で~=結果が「丸められた」ことを意味すると言います。

整数演算(少なくとも減算)が正確であってはならないので混乱します。

それでは、丸め記号があるのはなぜですか。これはどういう意味ですか?

ベストアンサー1

おすすめ記事