JDev 9.0.3.3 - float/double in the debugger

Hello!
I use JDeveloper ver. 9.0.3.3 and during last debug session I noticed one strange behaviour in the JDev debugger.
There is a variable of type float with value of 10964.17. I see the value when I do System.out.println() of the variable. But the debugger show me value of 10964.2 !!!
It seems like the debugger rounds the value. Also, I noticed the same behaviour with doubles too.
What you think about it?
I'll try to prepare a short test for the issue - when I'll have time for it.

No need to prepare the test. I can reproduce it easily from your description.
It only happens when debugging with OJVM. I've entered bug #3455484.
Sorry for the bug.
Thanks for the report.
-Liz Looney

Similar Messages

  • Float/double data types

    I use
    public void setId(float id) {this.id = id;}
    and
    setId(new Float(nodeNextTop.getChildNodes().item(0).getNodeValue()).floatValue());
    in my java files to get the value of a float which I want to display using
    <display:column align="center" sortable="true" nowrap="true" property="id" title="<%=id_%>" class="webText" />
    in my jsp file
    but it is displayed in true E format, ie, 1.123456789101112E15, I want to display the number as is, without the E, and it's beaten me, pls help.
    btw, double does the same

    top job, I'm learning something new each day, big thnx for the help

  • Float/double implementation

    I am writing an application in J2ME and badly need a float/double data type, which J2ME does not have. I was wondering if anybody had some good ideas on how to implement a float/double data type using only ints.
    Thanks.
    AnjuM

    Use 2 longs, one for the 1's and one for the deciamal part. if the decimal part is over the max number you want to represent in decimal then subtract max from it and add 1 to the 1's side.
    If I wanted to show 9 decimal places, then anything past 999,999,999 should have 1,000,000,000 subtracted from it and 1 added to the left side.

  • Float - double == loss of accuracy?  why?

    The following test fails:
    public void testFloat() {
            float number = 46702.45F;
            Float numberAsFloat = new Float(number);
            double numberAsDouble = numberAsFloat.doubleValue();
            System.out.println(numberAsDouble);
            assertTrue(46702.45 == numberAsDouble);
    }I probably just don't understand floating point data types or something, but I was very surprised that this test fails. If someone could enlighten me on WHY this fails, I would really appreciate it. For what it's worth, the value printed out for numberAsDouble was 46702.44921875 which I find entirely unexpected considering I am going from a lower precision data type (float) to a higher precision data type (double).

    Remember: the floating point representations (float and double) store binary values. Not decimal. The decimal values are parsed by the compiler and turned into floats and doubles in binary.
    The said binary values are approximations to the decimal values. Sometimes the binary and the decimal values coincide, but some times they don't.
    Floats have less precision than doubles.
    The binary string that represents that number, in a float, will be interpreted differently in a double, because the double has those additional bits of precision.
    Consider this code:
        double nd = 46702.45d;
        float nf = 46702.45F;
        long ndl = Double.doubleToLongBits(nd);
        long nfl = Float.floatToIntBits(nf);
        long nfl2 = Double.doubleToLongBits(nf);
        System.out.println(Long.toBinaryString(ndl));
        System.out.println(Long.toBinaryString(nfl));
        System.out.println(Long.toBinaryString(nfl2));It prints this:
    100000011100110110011011100111001100110011001100110011001100110
    1000111001101100110111001110011
    100000011100110110011011100111001100000000000000000000000000000
    // now I add spaces to line up the various segments
    // sign   exponent  mantissa
         1 00000011100  110110011011100111001100110011001100110011001100110
         1    00011100  1101100110111001110011
         1 00000011100  110110011011100111001100000000000000000000000000000Look at that string of "0011"'s on the version of the number created as a double.
    Compare it to the 0's in the version that was created as a float and used as a double.

  • Setting precision value of float/double

    Hi,
    I am retrieving data from database in to a float/double datatye. when i display the value it is showing the decimal of 4 to 5.(ex:4325.65785) but i want to display it as (ex:4235.65).
    Thanks
    Gopi

    import java.text.DecimalFormat;
    public class FormatTest
         public static void main(String[] args)
              DecimalFormat df = new DecimalFormat("##0.00");
              double d = 123456.2345678;
              System.out.println("Formatted: " + df.format(d));

  • Float/double confusion

    Could someone explain the theory behind the following:
    The default floating point data type is a double, hence the following declaration will not compile:
    float f=1.3;
    However the following declaration will compile:
    float f=1/3
    ...without specifying that it should be a float. Why does this happen, and why is the resulting value in f 0.0? Surely it should be 0.3333 or similar?

    1/3 is the integer 1 divided with the integer 3, and since they both are integers it would be natural for the result to be integer too, and so the division performed is called integer division. And the integer 0 is the result because one third is doesn't fit any integer. The fractional part is clamped. This result is then implicitely casted to produce the float 0.0f.
    Why? Because that's the way it goes in C and C++.

  • When I am on a phone call and I double click the button to go to my home screen, then open another application (usually my calendar program, Calengoo), my screen goes blank and I am not able to return to either the app, the phone, or the home screen.

    When I am on a phone call and I double click the button to go to my home screen, then open another application (usually my calendar program, Calengoo), my screen goes blank and I am not able to return to either the app, the phone, or the home screen. If I am speaking to a person, if they hang up then I am back to the phone application. If I'm leaving a message, I am unable to return to the phone screen to end the call, and have to wait until the other phone hangs up. I'm also unable to switch back and forth to look at my calendar if I'm calling someone about scheduling. This has only started happening since the most recent iOs update. I run into situations similar to this about once per day during the work week, as I use my phone is this manner quite often. While not life altering it is quite frustrating. Can anyone here help me figure out a way to avoid this? If it helps, I have noticed a general downgrade in overall performance starting two system updates ago (apps opening more slowly, closing unexpectedly more often, etc.). I have an iPhone 3GS with the latest OS update.
    Thank you for any help or suggestions,
    Chris

    I could be corrupted backup.
    You can check the notification settings for message.
    Settings>Notification Center>Messages>Alert Style
    It should be on Banners or Alerts.
    Settings>Messages> Turn on Imessage and send as SMS and below that "Blocked" to check if you have any numbers block might be blocking the message.
    You can also do a hard reset by holding power and home till it restarts and release after seeing the apple logo.
    Still doesn't work? Settings>General>Reset>Reset all settings

  • After the update I don't know how to close running apps? I recall double clicking the main button then hold one app until they begin a jiggling motion. But that no longer works.

    How do close running apps?

    You still double tap the home button and the apps are lined up across the screen. Swipe up on the app preview thumbnail - drag it up off of the screen - and that will close the app.

  • Unable to close open apps with double clicking the button and when I tap screen does not respond?

    Cannot not close open apps with double clicking the button Since downloading iOS8.

    What happens when you try? Does double clicking the ?home button bring up the Task Bar of recently used apps? If so what happens when you flick up on the preview screen for the app you want to close?
    To quit an app double click the Home button to reveal the row of recently used apps. Flick up on the page preview and it will fly away and disappear. That quits the app.

  • How do I get the "all floating" option in the "layout" to work?  Something happened that it stopped working.   I like to have several images on the screen at the same time.

    I like to work with several images at the same time on the photoshop elements 12 "expert" screen and used to be able to have the "all floating" option in the "layout", thereby altering each image differently on the screen.   I'm an artist and view multiple images while painting.   But now that option doesn't work for some reason.   Help!

    Editor preferences>general, turn Allow Floating documents, but then you may need to go to window>images>float all in windows to make it work for currently open files.

  • Dump error while creating or double click the info package

    Hello experts,
    I have actived infocube 0FIAR_C03 in BI content. Ago, The creation infopackage have been deleted in the past , today, I  created a infopackage, while I update mode selected u2018initialize delta processu2019, then click save button , the system prompt u2018Deltas already loaded for request  REQU_D64R47LDUSZHY9CBIB86WMLFJ init.selection; no 2. initu2019, I canoti save it for my setting. Why is this?
    Then I have search cause in SDN,  and I have reference OSS Note 852443 to do .
    Note 852443 have mention some table: RSSELDONE、RSSDLINIT、RSSDLINITSEL、ROOSPRMSC、ROOSPRMSF.
    I have to delete that request of record using se16 in these tables: RSSELDONE、RSSDLINIT、RSSDLINITSEL.
    in my BI 7.0 system,   ROOSPRMSC、ROOSPRMSF is no any data.
    I was no found delta queue in RSA7.
    Now . Dump error while creating or double click the info package,  how can I change this?
    Please let me know the solution.
    Thanks for your help.
    Best Regards
    Steve

    Here are some links  which deals with same issue.
    Re: Dump In Infopackage
    Re: Getting into Short dump at the time of selecting InfoPackage to execute for
    Short dump while performing init in infopackage
    Re: Infopackage going into short dump
    Thanks.

  • HT4623 iOS 6.1 no longer available because you are no longer connected to the internet- this is what my iphone 4 shows. iv tried switching off again and again, closing apps by double tapping the home button but still not working. please help.

    this is what my iphone 4 shows. iv tried switching off again and again, closing apps by double tapping the home button but still not working. please help.
    is there any other method to download ios 6.1.2.
    my phone is not being recognized by itunes on my new windows 8. neither its working on touch copy.
    kindly help.
    thanks

    well in thatcase, i need another help .
    thanks for your instant reply.
    i have currently bought a new laptop (windows 8) and my iphone is not being recognized by itunes.
    because i have no backup on my previous laptop, i downloaded touchcopy but even touch copy is not recognizing my iphone.

  • I have a Panasonic FZ38 HD camera. I can load and view my hd movies onto iMovie with no problems via my camera or a card reader.  When I try to copy my hd videos from my old Windows pc to my new iMac, the picture speed has doubled but the sound is normal.

    I have a Panasonic DMC-FZ38 HD camera and have lots of hd movie clips stored on my old Windows Pc using Photofun software supplied by Panasonic, which I want to transfer to my new Imac computer.   I am able to copy my most recent movies that are still on the memory card from my camera onto Imovie and view them with no problems at all.  When it comes to copying my old existing hd movies stored on my Windows Pc (and which are no longer stored on a memory card), I discover that when I view them on the Imovie, the speed has doubled but the sound is normal.   In order to transfer my old movies I have copied them back  onto a memory card (SDHC - the same card as previously used) and then put the card back into my camera and then copied them onto my Imac via the camera USB.   I have also used a card reader but get the same result.     If I view the same movie through my camera, or look at it on my old pc, it plays at normal speed.    Does anyone have any ideas as to why this is happening please?

    have you read and watch the Tutorials..? :
    http://www.apple.com/ilife/tutorials/#imovie
    iM is a bit.. iffy, when it comes to the definition, what a 'camera' is. historically, only tape based machines were a movie-camera. nowadays still-cams allow movin' images too..
    but, as mentioned above: the intended workflow is: material from photo cameras (even when they move) => import via iPhoto; material from video cameras (even when they don't move.. ) => iMovie
    when the import is done, you'll notice in all iLife apps the 'media browser' - in iM09, on the very right, the icon with a camera on.. click it, presto, all (incl. your 'videos') your iPhoto Library at hand for usage in iMovie.
    watch this:
    http://www.apple.com/findouthow/movies/imovie08.html#tutorial=otherimport
    (about from midths of tutorial...)

  • Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps wit

    Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps with ios7

    Now you swipe downward, the app will appear and you delete, keep scolling to the right as in the past.  With the new operating system you also swipe downward to get the search bar to find an app

  • I used to be able to double click the home button to choose to receive notifications via iPhone speaker instead of the Bluetooth. With ios7, that's gone as well as any obvious way to do it.  I don't wear my Bluetooth on my ear every minute of the day!!!!

    I used to be able to choose to receive notifications via iPhone speaker in ios6 by double clicking the home button.  Ios7 took that away and I cannot see how to do it at all.  I don't have my Bluetooth in my ear constantly!!!

    If you are getting Siri when you double tap, then your home button must be sticking. Siri comes up when you hold the home button. Try tapping quickly twice. When that happens, the multi-tasking list comes up and you will see the app icon and then a thumbnail, or reduced size view of the app above it. You put your finger on that thumbnail and swipe upwards with your finger.
    For that issue, you might want to do a reset of the phone. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot. This will not affect your data.
    To be honest, your novel is a little difficult to read, and I think you put too much information in there, and a lot of it is unnecessary. Be to the point and just add information necessary to understand the issue.

Maybe you are looking for

  • How do I play video podcasts on my TV using via Apple AV cable? After iOS 6 upgrade and being forced to use Podcast app, I'm unable to do this.

    I used to be able to play video podcasts on my TV by connecting my iPod touch to the TV via an Apple AV cable.  Now that I've upgraded to ios 6 and the podcasts app got installed along with the upgrade, video podcasts will no longer play on my TV whe

  • Back UP Data?

    My Dear Friends, Would you let me know how to back up data? I am working on data management especially for custom & LIS tables. I would like to know how to backup data, and also in which cases, data can not be backup, what is the reason for deleting

  • How do I find out the specs of an LCD TV (for the modeline)

    I bought a Toshiba 37x3030D LCD-TV, and I'm planning to hook it up to the DVI-out. However, I have no idea how to find out the different specs that X needs (vsync, hsync, that sort of thing) and I can't find a readymade modeline anywhere. Is there a

  • How to change the language in General on the software?

    Recently just purchased the software from the Apple store, however, due to my existing in Saudi Arabia and upon my account was created in Saudi's basis terms and conditions. I came to realize after the installation completed, the interface of the sof

  • JSP: Launch JNLP and output HTML?

    Hi, I've been able to launch a JNLP file using JSP -- this seems simple enough -- take a JNLP file, add <%@ page contentType="application/x-java-jnlp-file" %>to the top, then change the extension of the file to .jsp. I'm curious though: Is it possibl