Talk:strictfp
This article is rated Stub-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Old behaviour restored in Java 17
[edit]Mention this: http://openjdk.java.net/jeps/306 — Preceding unsigned comment added by Kupppper (talk • contribs) 17:24, 18 June 2021 (UTC)
gubbins
[edit]What the hell is a "gubbins"?
And what is Jet?
[edit]As far as I can tell Jet is Excelsior JET. I don't think it is necessarily relevant here. Glasser 16:57, 17 December 2005 (UTC)
overflow vs. underflow
[edit]The article says, "This could sometimes result in a numeric overflow or underflow in the middle of a calculation, even if the end result would be a valid number." Can someone give an example? that will be very nice. Jackzhp 02:00, 2 September 2007 (UTC)
Example?
[edit]http://java.sun.com/javase/6/docs/enwiki/api/java/lang/Math.html does not use the strictfp expression as this current sample source code from this article suggests:
// From java.lang.Math class............
public static strictfp double abs(double);
public static strictfp int max(int, int);
public static strictfp long max(long, long);
public static strictfp float max(float, float);
public static strictfp double max(double, double);
public static strictfp int min(int, int);
--Abdull (talk) 14:57, 6 October 2009 (UTC)
java.lang.Math.java doesn't contain "strictfp".
I've searched with Google code search, and I found:
- (page 3) http://hg.openjdk.java.net/jdk7/nio2/langtools›test›tools›apt›Basics›MisMatch.java
- This is testing code.
- (page 3) http://hg.openjdk.java.net/jdk7/nio2/jdk›src›share›classes›java›lang›StrictMath.java
- This explains why Math.java is clean.
- (page 5) http://hg.openjdk.java.net/jdk7/hotspot-svc/langtools›test›tools›apt›mirror›declaration›MethodDecl.java
- (page 5) http://hg.openjdk.java.net/jdk7/jaxp/langtools›test›tools›apt›mirror›declaration›ClassDecl.java
- (page 6) http://hg.openjdk.java.net/jdk7/nio2/langtools›test›tools›javac›FloatingPointChanges›Test.java
- These are test code.
- (page 7) git://github.com/ido/ludum-dare-2009.git›lib›net›phys2d›raw›World.java
- 2d physics engine.
That's all for the first 10 pages; the rest are all vm implementations, syntax highlighters &c. A similar search for StrictMath yielded:
- (page 3) http://jedit.svn.sourceforge.net/svnroot/jedit›plugins›Calculator›trunk›src›ise›calculator›Op.java
- A jEdit plugin.
- (page 3) cvs :pserver:anonymous@sahana.cvs.sourceforge.net:/cvsroot/sahana .›sahana-ext›sahana-datamining›src›weka›classifiers›meta›Bagging.java
- Part of Sahana.
- (page 5) http://hg.openjdk.java.net/jdk7/jaxp/jdk›src›share›classes›java›util›Random.java
- Generating random distributions.
- (page 5) http://rastertovector.googlecode.com/svn›trunk›src›com›sxz›math›PSNR.java
- (page 5) http://geogebra.kojo.googlecode.com/hg/›jasymca›Exponential.java
- (page 5) http://svn.apache.org/repos/asf/db/ojb/›trunk›src›test›org›apache›ojb›performance›PerfMain.java
- Apache profiling.
- (page 5) git://github.com/torarnv/cdt.git›org.eclipse.cdt.core›src›org›eclipse›cdt›internal›core›PositionTracker.java
- Part of Eclipse.
- (page 5) http://guttershark.googlecode.com/svn›trunk›examples›sound›tts›deploy›freetts›tools›FestVoxToFreeTTS›FindSTS.java
- Comparing waveforms.
- (page 5) http://svn.apache.org/repos/asf/db/derby/code/›trunk›java›engine›org›apache›derby›catalog›SystemProcedures.java
- (page 7) 6 hits
- (page 9) 3 hits
In all cases, the use of using strictfp is highly debatable. I don't think many tears would be shed if they keyword were dropped (or perhaps replaced by a few functions that do the necessary work). —Preceding unsigned comment added by 82.139.87.74 (talk) 01:42, 26 July 2010 (UTC)
Merging-in information
[edit]Criticism of Java#Floating point arithmetic is being merged here. Any idea of how best to do it? dmyersturnbull ⇒ talk 17:31, 21 April 2010 (UTC)
Strictftp a problem?
[edit]None of the sources mention strictftp and only one of them mentions that the way java handles float values is a problem. Is this point even valid or just a mixup of java float in general with the strictftp keyword? —Preceding unsigned comment added by 90.134.60.44 (talk) 13:32, 24 July 2010 (UTC)
To my knowledge, you are correct: it is not strictfp that is considered to be a problem but there are ideas for improving Java's floating-point performance further at the cost of platform-dependence. I rephrased the section. Jaan Vajakas (talk) 13:43, 21 September 2010 (UTC)
strictfp for blocks
[edit]It is possible to write a strictfp block (inside a method), or even a strictfp statement, for example strictfp x=y; . Please verify that it works properly (didn't check it) and find a reference. Honnza (talk) 10:38, 30 December 2010 (UTC)
java.lang.Math has no strictfp usage
[edit]This article claims that
The Java package java.lang.Math class contains these strictfp methods:
public static strictfp double abs(double); public static strictfp int max(int, int); public static strictfp long max(long, long); public static strictfp float max(float, float); public static strictfp double max(double, double); public static strictfp int min(int, int);
, but on inspection of the Java source code provided with the JDK, I found absolutely no occurrence of strictfp — Supuhstar * § 21:38, 26 August 2011 (UTC)