Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - 日本語


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 xmlSetValues as follows (to set the mode to 1) :

    xmlSetValues("//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.
Report an issue
<< format Floating point int >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:17:40 CEST 2024