- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something like the below should not suffice:--
printf("%d\n", i++ * i++);
i++ + j++ * k++
i++ + (j++ * k++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something like the below should not suffice:--
printf("%d\n", i++ * i++);
i++ + j++ * k++
i++ + (j++ * k++)
I do not do such masochism. I figured out: besides the option -O2 is necessary to specify the option -fp: double (not everyone thought of this before!). Previously, this was not. Perhaps the developers overheated in the sun.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, icpc option combination -fp:source -O1 has closest effect to Microsoft option -fp:fast. If you don't use float data types, -fp:double would have identical effect.
In case it's of interest, several C and C++ compilers in common use still have options which imply K&R treatment of parentheses, such as gcc -ffast-math, which by design allow the compiler to perform algebraic simplifications by disregarding parentheses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not everyone has such deep knowledge as you. Previous versions did not require the option -fp:double. Microsoft's compiler option -fp: fast is working correctly, and Intel's compiler - no. Previous versions of the Intel's compiler work correctly with only one option -O2. I think that developers are too hasty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already wrote above that the option -fp: double corrects the situation.
Best regards,
Yurii
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already wrote above that the option -fp: double corrects the situation.
Here's the code snippet:
x=f1(a,b,c,...);
x=f2(x,f,g,...);
where f1 and f2 - arithmetic expressions (+,-,*,/,brackets).
The program works for such fragments in some cases incorrect.
Am submitting changes:
y=f1(a,b,c,...);
x=f2(y,f,g,...);
The program considers correct.
Interestingly, developers heard something about the IEEE?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page