Skip to content

Add sse options to avoid math3d test errors on MSYS2/MinGW-w64 32bit #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hamayama
Copy link
Contributor

  • MSYS2/MinGW-w64 32bit 環境で、math3d のテストがエラーになったため、
    configure.ac 内で SSE 使用のオプションを追加するようにしました。

  • make check で 以下のエラーが出ていました。

    discrepancies found.  Errors are:
    test 2vtest #,(vector4f 1 1 0 0) #,(vector4f 1 1 0 0): expects #,(vector4f 0.707107 0.707107 0 0) => got #,(vector4f 0.707292 0.706922 0 0)
    test 2vtest #,(vector4f 1 1 0 0) #,(vector4f 1 1 0 0): expects #,(vector4f 0.707107 0.707107 0 0) => got #,(vector4f 0.707292 0.706922 0 0)
    
  • 多分また 387 の 80bit 浮動小数点数演算の関係だと思います(詳しくは調べていませんが。。。)。

  • 少し前に MSYS2 を更新したのですが、更新前は問題ありませんでした。
    (古い test.log が残っていたので確認しました)

<テスト結果>
OS : Windows 8.1 (64bit)
Gauche : コミット a2a9673 + 本変更

開発環境1 : MSYS2/MinGW-w64 (64bit) (gcc version 6.3.0 (Rev2, Built by MSYS2 project))
make check - OK
サンプルプログラムの起動 - OK

開発環境2 : MSYS2/MinGW-w64 (32bit) (gcc version 6.3.0 (Rev2, Built by MSYS2 project))
make check - OK
サンプルプログラムの起動 - OK

開発環境3 : MinGW.org (32bitのみ) (gcc v4.8.1)
make check - OK
サンプルプログラムの起動 - OK

@shirok
Copy link
Owner

shirok commented May 27, 2017

ふーむ、sseオプションで消えるというのは8087の精度問題っぽいですが、誤差がかなり大きいのが気になりますね。もともとこのテストでは誤差を考慮した比較をしているので、多少の誤差があっても大丈夫なはずなんですが。

実際に実行したプロセッサは64bitなんですよね? だとするとmingw-w64 32bit環境での何らかのエミュレーションが影響しているのかな? ちょっと手元でも確認してみます。

@Hamayama
Copy link
Contributor Author

こちらのプロセッサは、
Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
です。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants