Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Rounding 環境変数
使い方
Rounding := x
パラメータ
x - 0, nearest, infinity, -infinity のいずれか
説明
Rounding 環境変数は浮動小数点計算の結果をどう丸めるかを制御します。
Maple で利用できる丸めモードは次の 4 つです:
Rounding モード 意味 nearest 可能な最も近い値に丸めます。 候補が2つあるときは偶数を優先します。 0 0 に向かって丸めます。 infinity 正の無限大に向かって丸めます。 -infinity 負の無限大に向かって丸めます。
Rounding の値は割り当て演算子を使って変更します。Rounding のデフォルト値は nearestです。
Maple セッション中の Rounding の現在の値を知るには、Rounding; というコマンドを入力します。
他に決定する方法がないときには、丸めモードが 0 の符号を決定します。
無限大は丸めモードとは独立で常にそれ自身に丸められます。
Maple は Rounding のような環境変数を完全に評価します。Rounding は環境変数なので、手続き本体の中でそれにどんな値を割り当てても、その手続きから抜け出したときに、その割り当ては取り消されます。
例
Rounding;
f := proc() print( "Entering f. Rounding is", Rounding ); Rounding := -infinity; print( "The current value of Rounding is", Rounding ); end proc: f();
上の手続きの中の f から戻ったときに、Maple は Rounding を f に入る前の値に戻します。
1.4^10;
Rounding := 0;
Rounding := nearest;
2. - 2.;
Rounding := -infinity;
参照
Default0, assignment, environment, last_name_eval, float, infinity, round, type[infinity], type[float]
Download Help Document