Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1090983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:27:16+00:00 2026-05-16T23:27:16+00:00

some program in C which does extensive floating point calculations get right results on

  • 0

some program in C which does extensive floating point calculations get right results on a pc linux box, but wrong results on the SPE of the cell processor, but not on the PPU of the cell. I am using gcc compilers. I wonder if there is some gcc compilation option to increase rounding method or similar so I get single float precision calculations with more precision. I can not change to double, as on the SPE performance would drastic reduce

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:27:16+00:00Added an answer on May 16, 2026 at 11:27 pm

    Based on the IBM documentation for the differences from IEEE 754 on the SPU, it could be any number of things:

    • Zero results from arithmetic operations are always +0, never -0.
    • Denormal inputs from 2-149 to 2-126 to arithmetic operations are treated
      as zero with the same sign. Arithmetic
      operations never produce denormal
      results, but produce +0 instead.
    • Arithmetic operations do not support IEEE Inf or NaN. These bit patterns
      represent valid numbers. Overflow
      results produce the maximum magnitude
      value of appropriate sign.
    • Arithmetic operations use only the round-to-zero (chop, truncate)
      rounding mode, regardless of the
      setting of the rounding mode in the
      Floating-Point Status and Control
      Register (FPSCR), which affects only
      double-precision arithmetic
      operations.

    Of course, on a related page, you can also compile SPU code for strict IEEE conformance:

    By default, XL C/C++ follows most, but
    not all of the rules in the IEEE
    standard. If you compile with the
    -qnostrict option, which is enabled by default at optimization level -O3 or
    higher, some IEEE floating-point rules
    are violated in ways that can improve
    performance but might affect program
    correctness. To avoid this issue, and
    to compile for strict compliance with
    the IEEE standard, do the following:

    • Use the -qfloat=nomaf compiler option.
    • If the program changes the rounding mode at runtime, use the -qfloat=rrm
      option.
    • If the data or program code contains signaling NaN values (NaNS), use the
      -qfloat=nans option. (A signaling NaN is different from a quiet NaN; you
      must explicitly code it into the
      program or data or create it by using
      the -qinitauto compiler option.)
    • If you compile with -O3, -O4, or -O5, include the option -qstrict after it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C++ program which does some processing on a char search[500] array.
I have written a multithreaded program which does some thinking and prints out some
I am trying to make a program which does a very basic calculation, but
I have made some c code for a program, which does some psycho-acoustics on
I wrote a multi-threaded program which does some CPU heavy computation with a lot
I have a program which does some copy jobs (via File.Copy) that could last
I am developing some program in C# which will send the mail using outlook
Can some one recommend any free program which counts the number of clicks Clicked
I'm developing a program which allows users to input some information which then gets
I made a program which i want to launch with some protocal for eg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.