ts-7000
[Top] [All Lists]

Re: [ts-7000] TS-7300 JAVA Problem

To:
Subject: Re: [ts-7000] TS-7300 JAVA Problem
From: Dave Cramer <>
Date: Tue, 26 Sep 2006 22:48:23 -0400
There's some errors in the floating point libraries on the arm. I can't recall if this is just the gnuclasspath problem, or glibc.

Check the archives for floating point back in March

Dave
On 26-Sep-06, at 5:49 PM, gcworrell wrote:

Problem :
When printing a float or double as a String, the resulting string
interpretation of the value is wrong (i.e. not close to the original
value) and it contains non-numeric characters.

Below is a session log that contains:
A cat of a simple program called WriteTest
The results of the execution of WriteTest
The results of java –version

<<< Log from MSISR started September 20, 2006, 17:12:45 >>>

:JAVA# cat
WriteTest.java

class WriteTest
{

public WriteTest()
{
super
();
}
public static void main(java.lang.String[] args)
{
double doubleValue = (double)
0.123456789;
float floatValue = (float)
0.123456;
System.out.println("Double Value = "+doubleValue+" Float
Value
= "+floatValue);
}
}
:JAVA# java
WriteTest

Double Value = 0.=75073800938646879 Float Value =
0.070:679

:JAVA# java -
version

java
version "1.4.2"


JamVM version
1.4.3

Copyright (C) 2003-2006 Robert Lougher
<org.uk>

:JAVA#

<<< Log from MSISR ended September 20, 2006, 17:14:07 >>>

NOTES :
The value stored in the variable appears to be correct. The actual
program I was running when I found this problem seems to receive the
correct double or float value when used in computations. The error
appears to be in the toString() method.

I had originally installed the stable version of JamVM on the TS-
7300, but it had lots of problems. At first I thought it was the
java application, but the same application has run without problems
on many other java runtimes, including the IBM j9 that I used on an
ARCOM Vulcan PC104 CPU. One of the items that jumped out at me was
that the file separator was coming up as a ":" instead of a "/".
Once I saw that, I installed the testing version of JamVM. Now
everything works correctly except the items noted here (or at least
I should say I haven't found any other problems). I also tried
SableVM. It performed exactly the same.

I've run the WriteTest application on several other platforms with
different runtimes, and it works correctly on all.

I've submitted this as a bug report to the Debian folks and have
recieved no reply.

Thanks for any help. I'm busy trying work-arounds, such as :
(new Double(doubleValue)).toString()
But that produces the same results.

Please contact me if you need any additional information. I'll be
in a real Jam (no pun intended) if I can't get this to work.


__._,_.___


SPONSORED LINKS
Single board computer Hardware Computer running slow
Linux os Single board

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU