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

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > Floating point > nearfloat

nearfloat

前のまたは次の浮動小数点数を取得

呼び出し手順

xnear = nearfloat(dir, x)

パラメータ

dir

文字列 ("succ" または "pred")

x

実数のスカラー, ベクトルまたは行列

xnear

実数のスカラー, ベクトルまたは行列

説明

この関数は要素毎に xの要素の(浮動小数点数の集合の意味で)隣にある要素 (number_properties参照)を計算します. dir = "succ"の場合は次の要素, dir = "pred".の場合は前の要素となります.

format("e",22)
nearfloat("succ",1) - 1
1 - nearfloat("pred",1)
format("v") //デフォルトの形式をリセット

参照

  • number_properties — 浮動小数点数パラメータを定義する
  • frexp — 浮動小数点数を2を基底とする指数部と仮数部に分解する
Report an issue
<< isnan Floating point nextpow2 >>

Copyright (c) 2022-2023 (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:
Tue Apr 02 17:37:31 CEST 2013