Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - Русский
Scilabヘルプ >> Elementary Functions > Floating point > ieee

ieee

浮動小数点例外モードを設定

呼出し手順

mod = ieee()
ieee(mod)

引数

mod

整数スカラーで,0,1または2を指定

説明

ieee() はカレントの浮動小数点例外モード を返します.

0

浮動小数点例外はエラーを発生

%inf and %nan special values can be used in this mode without error. For instance, %inf/%inf, %inf-%inf or %inf/%nan are known operations.

1
浮動小数点例外は警告を発生.
2
浮動小数点例外は無限大(Inf)またはNaNを発生.

ieee(mod) sets the current floating point exception mode to mod.

The default initial mode is 2. This default value may be set in any of the following ways:
  • Through the Preferences GUI: preferences, in the section General => Environment => ieee.
  • Equivalently, using setPreferencesValue as follows (to set the mode to 1) :

    setPreferencesValue("//general/body/environment", ["fpe";"1"])

  • Or by using ieee(mod) in your startup file.
ライブラリのアルゴリズムの内部で発生した浮動小数点例外は, まだieeeモードでは設定できません.

ieee(1); 1/0
ieee(2); 1/0, log(0)

参照

  • %nan — not-a-number
  • %inf — 無限大
  • isinf — tests for infinite elements
  • isnan — "Not a Number" エントリを調べる
  • number_properties — 浮動小数点数パラメータを定義する

履歴

バージョン記述
6.0.0 2 is now the initial mode value.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 15:02:06 CET 2019