5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

言語比較 > 10のべき数を表す記号 > D / E / *10^

Last updated at Posted at 2015-05-02
動作環境
CentOS 6.5

10のべき数を表す記号が異なるため、使う言語/環境によっては意図しない数値となってしまう。
異種環境間を行き来する時は適宜変換が必要になる。

言語/環境 記号 動作
awk(代入時) E 1.e-5
awk(printf "%e"出力) E 1.e-5
awk(代入時) D 1.d-5 NG (d-5以降無視される)
Fortran(real*8: 代入時) E 1.e-5 NG (単精度に精度が落ちる)
Fortran(real*8: 代入時) D 1.d-5
Fortran(real*8: print出力) E 1.E-05
C (代入時、%e出力時) E 1.e-5
C (代入時) D 1.d-5 NG (invalid suffix)
bc -l(代入時) E 1.e-5 NG (syntax error)
bc -l(代入時) D 1.d-5 NG (syntax error)
bc -l(代入時) *10^ 1.0*10^-5
EXCEL(入力時) E 1.e-5
EXCEL(入力時) D 1.d-5 NG (入力が無効になるようだ)
grace E 1.e-5
grace D 1.d-5

Fortran以外ではEに変換するのが無難かもしれない。

bcの場合は"10のべき数"でなく"べき乗"でしか扱えなさそう。

5
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?