Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page >

浮動小数点数の等価比較

浮動小数点数の等価比較の結果は、アーキテクチャに依存します。比較が正しく動作するかどうかは、コンパイラ、前後のコード、使用中のすべてのコンパイラフラグ(特に最適化フラグ)、スレッドの現在の浮動小数点モードなど、いくつかの状況に依存します。浮動小数点の比較が現時点でPowerPC上で動作していても、インテルベースのMacintoshコンピュータ上での動作を確認する必要があります。

GCCの-Wfloat-equalフラグを使用すると、浮動小数点数の等価比較に対する警告を受け取ることができます。このオプションの詳細については、『GNU C/C++/Objective-C 4.0.1 Compiler User Guide』のセクション3.8を参照してください。



< Previous PageNext Page >


Last updated: 2006-03-08




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice