Seeking Volunteers for Serious Java Project

I’m looking for a team of Java subsystem (beneath the hood) programming and building experts, who know about Java implementation beneath the surface, know the C language and mathematics and multiplatform development, to help me make some major changes, for a special version of Java, to debug Java floating point errors. If I wanted to find such volunteers through here, what Forum area do you guys recommend that I post to?

Probably Marketplace - jMonkeyEngine Hub

The suggested link states that it is for ‘paid work only’. If I am seeking after a volunteer effort,
for what I originally suggested at the top of my discussion thread, is there somewhere more appropriate
either part of JMonkey or elsewhere that I am advised to turn to, for a deeper, more complex project?

What is the category of your project concerning jMonkeyEngine or are you seeking help with another project ? i think if you posted what you are seeking for directly, we may respond, for example what kind of work do you want concerning natives and jni ? What kind of maths is it, as there are a lot of maths categories ? Are you going to debug a special version of jdk ? What kind of platforms do you want to support ? What tools are you using ? Is this project related to jme ? Does it involve android and embedded systems ?

how is it connected to JME?

Ok, i thought it was some sort of paid position.
If the problem is just the category, just use the one you feel is more appropriate.
We can move the topics with ease, so there is no need to worry about that, I’m sure nobody would complain.

My project is not directly related to JME, but indirectly, because of its floating point consequences. I am trying to search far and wide for a team who could volunteer and take on the scope and complex nature of what I am asking. At any rate, I upload a copy of the specification document for people to read. I’m not trying to post an innappropriate message in this area. If what I’m after is having this particular effort acheived, and absolutely not any other kind of approach, can anyone here directly help, or point me in a specific, better, direction?

https://github.com/ibmruntimes/Semeru-Runtimes/issues/24

Ive read through your link but im not totally sure what you’re proposing. Is it a switch at the java level such that all floats switch to using BigDecimal (possible but really slow) or to somehow change floats so a decimal → float → decimal is always error free (which is i believe impossible*)

  • impossible in the same way the base 3 number 1/3 can’t be expressed in decimal and ends up as 0.333
1 Like

…the floating point math is actually done on the CPU.

For those who don’t know, the way that Floating Point storage with float and double works in java is that everything, including the decimal ahd hexadecimal you see is stored, operated on, and translated to and from, one particulary form of binary. The particular, one form of Binary Java uses is from the IEEE 754 standard. It is one particularly scheme for binary (apparently), but there are others. See at:

https://introcs.cs.princeton.edu/java/91float/

What I am proposing is, for representation and calculation for float and double, changing the non-integer part of their equation inside Java so that the integer and non-integer part reflect one another. While this will reduce the range for small decimal numbers in Java, it will be able to totally eliminate overflow and underflow errors totally, for all arithmetic operations and all java.lang.StrictMath Operations too, with those being updated and being brought up to speed with an altered representation equation. The rest of the class library that comes with Java will have to undergo changes and testing too, but for a volunteer team or Java vendor that can accurately develop, test and accomplish all this, and republish all online, there will be a corrected version of Java that will never experience a floating point error ever again. Is anyone near this forum interested, or can they point me in an active direction for more success in finding some helpful Java, C, programmers?

I don’t understand what this means.

an interesting topic.
Computer is all about “Discrete”, IEEE float point is a tradeoff of accuracy and range and memory usage.

for representation and calculation for float and double,
changing the non-integer part of their equation inside Java so that the integer and non-integer part reflect one another.

Don’t think you can compete IEEE754. there is no integer part in float point, it has sign ,exponent and fraction parts. see float point number normalization( 0<fraction<1).
If you mean to separate a real number with two parts: before “the point” and after “the point” ,it just don’t make sense unless you can break the binary foundation of CS.
BTW :
For accuracy, How do you handle Irrational Numbers ? :thinking:

2 Likes

to be more specific :https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-2.html#jvms-2.3.2
"

A representation in this form is called normalized if m ≥ 2N-1; otherwise the representation is said to be subnormal.

"

1 Like

That what i understood from these lines too (a C struct with 2 phase memory), but i think this have a memory impact downside too, but idk i may be wrong.

Have a look at all this, particularly this video, and these two images as reminders. Remember, the decimal point, the dot separator, is just into the array, to the side of the sign bit and the start of the exponent bits.

(note that the 2’s complement doesn’t seem to apply to Java.)

What I want changed is the fact that whole natural numbers are positive powers of 2, and fractional numbers less than 1 are treated as negative powers of 2, along with consequences in the language and core libraries stemming from this. The fractional numbers less than one should be treated as positive powers of 2 as well. In Java, this happens when a value is compiled in, set somehow during the running of a program, calculated via floating point arithmetic and calculated from the fields of methods of the java.lang.StrictMath class.

This will mean that more more precision with a fixed number of total bits, 32 and 64, float and double, the lower data range will not reach as far. However, this is in the region of very small numbers, and not whole large ones, where even System.out.println() doesn’t/can’t even consistently display.

Is there anyone involved with this forum who can put me on to volunteers/a team/an entity who could take a project like this on?

Are there any Java “behind-the scenes”, implementation programmers out there who could volunteer for a project like this, who would like to learn more about this matter?

1 Like

Without going into the merits of this post, i think you’d have a better chance to find people interested in this topic if you were to post on reddit.

1 Like

Did a small investigation.
Just found something to explain the difference between java.lang.Math and java.lang.StrictMath,
for short:
the later one guaranties exact same results by using static “soft code” instead CPU side hardware like x87 instrument which java.lang.Math may or may not choose to use depend on different JREs:What’s the difference between java.lang.Math and java.lang.StrictMath?

What I am interesting here is the impact on our ,com.jme3.math.FastMath which some functions are wrappers to java.lang.Math.
For example, com.jme3.math.FastMath.sqrt()

    /**
     * Returns the square root of a given value.
     *
     * @param fValue The value to sqrt.
     * @return The square root of the given value.
     * @see java.lang.Math#sqrt(double)
     */
    public static float sqrt(float fValue) {
        return (float) Math.sqrt(fValue);
    }

For android: the java.lang.Math.sqrt() goes like :

    @CriticalNative
    public static native double sqrt(double a);

This means it goes hardware solutions AND the result may not as bit-to-bit same as it is on PC or Mac.
:thinking:

2 Likes

That’s probably the right approach. It says fast math, not accurate math

2 Likes

Very true… also, floats/doubles are by nature approximate. Bit-to-bit accuracy doesn’t matter - what matters is if the results are accurate enough for their intended use, and I don’t realistically see any hardware or well-qualified math libraries in the industry being so inaccurate on a square root operation that there would be any practical difference.

@Z1234 Three general questions I have for you, to help me and others understand the overall goal of this project. This sounds way out of the realm of what I know and am interested in, but I am still curious:

  1. What is the primary goal of this project: Are you aiming to make a profitable product? Or is this a personal project with the primary goal being to learn new things? Or is it potentially a project where you are just trying to prove you have a better way of doing things than how java does it by default, even if its not eventually profitable?

  2. If the goal is to make a profitable product, do you have a target market or any potential customers who have demonstrated demand for a version of java with higher precision?

  3. Do any other similar things exist that you are competing with? If yes, then that is a good indication that what you are doing might have demand in the industry, but then it also begs the question as to how your implementation is better than what already exists.

I’m not quite interested or knowledgeable in this intricate side of CS to be entirely honest, I find it much more rewarding and productive to focus on higher level programming, and I personally cannot see any way that delving into this project will teach me more or offer more opportunities than continuing my pursuit of game dev (and I expect that is the case for many other JME devs here). But I am still curious to know more about why you choose to pursue this idea and what the end goal is.

1 Like