Java Types (i.e., Double Float) Help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Java Types (i.e., Double Float) Help

  1. #1
    Join Date
    Sep 2003
    Posts
    36

    Java Types (i.e., Double Float) Help

    I am trying to mimic a Visual Basic 6 program that uses single persion;

    Single(single-precision floating-point)- 4 bytes
    -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values.

    I am having problems with calculations and think its because of Java's Type persion. Does anyone know of away to convert a Java float or a double into a VB equivalent single percision value?

    Thanks. Ronnie

  2. #2
    Join Date
    Sep 2004
    Posts
    150
    Well if it helps a "float" corresponds to a single precision, and a "double" corresponds to a double precision value in Java.

    They conform to the IEEE 754 standard. I don't know if VB 6 does. But if it does they should be compatible.

  3. #3
    Join Date
    Sep 2003
    Posts
    36
    Thanks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center