Skip to content
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

double to string #9

Open
frankbauer opened this issue Jan 21, 2019 · 3 comments
Open

double to string #9

frankbauer opened this issue Jan 21, 2019 · 3 comments
Assignees
Labels

Comments

@frankbauer
Copy link

Compiling the following code

public class Main {
  public static void main(String[] args){
    System.out.println(1.0);
  }	
}

produces the following error with the latest master

ERROR at Main.java:4 Native method java.lang.Double.doubleToLongBits(D)J has no implementation
    at java.lang.Double.doubleToLongBits
    at org.teavm.classlib.impl.text.DoubleAnalyzer.analyze(DoubleAnalyzer.java:76)
    at java.lang.AbstractStringBuilder.insert(TAbstractStringBuilder.java:351)
    at java.lang.AbstractStringBuilder.append(TAbstractStringBuilder.java:309)
    at java.lang.StringBuilder.append(TStringBuilder.java:61)
    at java.io.PrintStream.println(TPrintStream.java:197)
@konsoletyper konsoletyper self-assigned this Jan 21, 2019
@paiboonpa
Copy link

paiboonpa commented Apr 25, 2019

@konsoletyper For some reason, it's working fine at http://teavm.org/sandbox/index.html. I could copy the library directly from there but I do not have source file to modify it. If only there's a source code version of that sandbox, that would be great.

@paiboonpa
Copy link

@konsoletyper
System.out.println(1f);
Also output as NaN on both version.

@dmfrancisco
Copy link

I ran into this issue too. I ended up cloning and installing @frankbauer's fork of TeaVM itself (had to change teavm.version in the teavm-javac root pom.xml to 0.6.0-for-javac-107 to use that local build instead of the remote one).

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

No branches or pull requests

4 participants