Do numerical indicators display extended precision floats correctly?

I'm using windows XP sp2 on a new computer with a new intel processor, nothing weird. I'm displaying an extended precision floating point number using a numeric indicator that is set to display an extended data type with thirty digits of precision. I expect to see at least 19 or 20 significant digits out of my extended precision float, but the numeric indicator only ever displays 17 significant digits before going to a trail of zeros. Does the display routine that converts the float to a display string use double precision or what?
global variables make robots angry

Yes, I understand what you are saying and you are completely correct. The problem I have is not that I expect a mathematically perfect representation of a number, but rather that LabVIEW calculates and produces an 80-bit extended precision number on my computer and then appears to convert it to a 64-bit representation of that number before displaying it!
If you convert the extended precision value into an unflattened string in order to attempt to access the binary representation of the data, you’ll find that it is represented by 80-bits. This is a 64-bit fraction plus a 15-bit exponent plus one bit for the sign. Delightfully, the flatten to string function appears to scramble the bits into “noncontiguous” pieces, so about all I can tell for certain is that we have, as expected, an 80-bit extended precision number in memory. The documentation for the other number-to-Boolean array and bit manipulation functions I looked at (even the exponent-mantissa function) all claim to only be able to handle a maximum input of a 64-bit number (double precision float max) -correct me if I’m wrong on this one, because I’d really like to be able to see the contiguous binary representation of 80-bit extended floats.
It turns out though that what you said about not being able to tell whether we have twenty digits of precision without bit fiddling is not true at all. If you look at the program I wrote, you can prove with simple addition and subtraction that beyond the shadow of a doubt the extended numbers are being stored and calculated with twenty digits of precision on my computer yet being displayed with less precision.
As you can plainly see in the previous example I sent:
A =          0.1111111111
B =         0.00000000001111111111
A+B=C= 0.11111111111111111111
We know that
C-A=B
The actual answer we get is
C-A=0.00000000001111111110887672
Instead of the unattainable ideal of
C-A=0.00000000001111111111
The first nineteen digits of the calculated answer are exactly correct. The remainder of the actual answer is equal to 88.7672% of the remainder of the perfect answer, so we effectively have 19.887672 digits of accuracy.
That all sounds well and good until you realize that no individual number displayed on the front panel seems to be displayed with more than 16-17 significant digits of accuracy.
As you see below, the number displayed for the value of A+B was definitely not as close to being the right answer as the number LabVIEW stores internally in memory.
A+B=0.11111111111111111111 (the mathematically ideal result)
A+B=0.111111111111111105     (what LabVIEW displays as its result)
We know darned well that if the final answer of A+B-A was accurate to twenty digits, then the intermediate step of A-B did not have a huge error in the seventeenth or eighteenth digit! The value being displayed by LabVIEW is not close to being the value in the LabVIEW variable because if it were then the result of the subtract operation would be drastically different!
0.11111111111111110500       (this is what LabVIEW shows as A+B)  
0.11111111110000000000       (this is what we entered and what LabVIEW shows for A)
0.00000000001111110500    (this is the best we can expect for A+B-A)
0.00000000001111111110887672 this is what LabVIEW manages to calculate.
The final number LabVIEW calculates magically has extra accuracy conjured back into it somehow! It’s more than 1000 times more accurate than a perfect calculation using the corrupted value of A+B that the display shows us – the three extra digits give us three orders of magnitude better resolution than should be possible unless LabVIEW is displaying a less accurate version of A+B than is actually being used!
This would be like making a huge mistake at the beginning of a math problem, and then making a huge mistake at the end and having them cancel each other out. Except imagine getting that lucky on every answer on every question. No matter what numbers I plug into my LabVIEW program, the intermediate step of A+B has only about 16-17 digits of accuracy, but miraculously the final step of A+B-A will have 19-20 digits of accuracy. The final box at the bottom of the program shows why.
If you convert the numbers to double and use doubles to calculate the final answer, you only get 16-17 digits of accuracy. That’s no surprise because 16 digits of accuracy is about as good as you’re gonna do with a 64-bit floating point representation. So it’s no wonder all the extended numbers I display appear to only have the same accuracy as a 64-bit representation because the display routine is using double precision numbers, not extended precision.
This is not cool at all. The indicator is labeled as being able to accept an extended precision number and it allows the user to crank out a ridiculous number of significant digits. There is no little red dot on the input wire telling me, ‘hey, I’m converting to a less accurate representation here, ok!’ Instead, the icon shows me ‘EXT’ for ‘Hey, I’m set to extended precision!’
The irony is that the documentation for the addition function indicates that it converts input to double. It obviously can handle extended.
I’ve included a modified version of the vi for you to tinker with. Enter some different numbers on the front panel and see what I mean.
Regardless of all this jazz, if someone knows the real scoop on the original question, please end our suffering: Can LabVIEW display extended floating point numbers properly, or is it converting to double precision somewhere before numerals get written to the front panel indicator?
Message Edited by Root Canal on 06-09-2008 07:16 PM
global variables make robots angry
Attachments:
numerical display maxes out at double precision 21.vi ‏17 KB

Similar Messages

  • Port of Giac [Longfloat] Library to HP Prime allowing [Variable Precision] Floating Point Arithmetic

    HP Prime CAS is based on Giac, but [ misses ] some of its Special Purpose Libraries like the Giac [ Longfloat ] Library, which if [ Ported ] would allow HP Prime to be the First ( handheld ) Calculator to provide [ Variable Precision ] Floating Point Arithmetic routines ( fully integrated at its CAS Kernel level ). HP Prime already have internal calls to [ Longfloat ] library, but resulting in [ Error Messages ], like when selecting more than 14 Digits in [ evalf ] Numerical evaluation, as for example: evalf( 1/7, 14 ) producing 0.142857142857 and evalf( 1/7, 15 ) resulting in "Longfloat library not available Error: Bad Argument Value" The same happens when one tries to Extend the [ Digits ] variable to a value greater than 13, like Digits := 50 which returns Digits := 13 as output ( from any specified value higher than 13 ).  The porting of [ Longfloat ] library to HP Prime, would open many New opportunities in [ handheld ] Numerical Computation, usually available only on Top Level Computer Algebra Systems, like Maple, Mathematica or Maxima, and also on Giac/XCas. Its worth mentioning that Any [ Smartphone ] with Xcas/Giac App installed, can fully explore [ Variable Precision ] Floating Point Arithmetic, on current ARM based architectures, which means that a Port of [ Longfloat ] Library from Giac to HP Prime, although requiring some considerable amount of labor, is Not an impossible task. The Benefits of such Longfloat [ Porting ] to a handheld Calculator like HP Prime, would put it several levels Up on the list of Top current Calculator Features, miles and miles away from competitors like TI Nspire CX CAS and Casio ClassPad II fx-CP 400 ... Even HP 49/50g have third party developed routines with limited Variable Precision floating point support, while such feature is Not fully integrated to their native CAS Kernel. For those who do not see "plenty" reason for a [ Longfloat ] Porting to HP Prime its needless to say that the PRIMARY reason for ANY [ CALCULATOR ] is to CALCULATE ! and besides Symbolic Computation ( already implemented on all contemporaries top calculator models ), Arbitrary / [ Variable Precision ] Floating Point Arithmetic is simply The TOP of the TOP ( of the IceCream ) in [ Numerical ] Computation ! ( and beside Computer Algebra Manipulation routines, one of the Main reasons for the initial development of the major packages like Maple, Mathematica or Maxima ).

    Thanks for the Link to [ HPMuseum.org ] Page with Valuable Details about the Internal Floating Point implementations both on Home and CAS environments of HP Prime. Its interesting to point to the fact that HP 49/50g has a [ Longfloat ] Version 3.93 package implementation ( with the Same Name but Distinct Code from the Giac Library ) available at [ http://www.hpcalc.org/details.php?id=5363 ] Also its worth mentioning [ Wikipedia ] pages on Arbitrary Precision Arithmetic like [ https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic ], [ https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software ] and [ https://en.wikipedia.org/wiki/List_of_computer_algebra_systems ] and the Xcas/Giac project at [ https://en.wikipedia.org/wiki/Xcas#Giac ] and Official Site at [ http://www-fourier.ujf-grenoble.fr/~parisse/giac.html ] It would be a Dream come True when a Fully Integrated Variable Precision Floting Point Arithmetic package where definetively incorporated to HP Prime CAS Kernel, like the Giac [ Longfloat ] Library, allowing the Prime to be the First calculator with such Resource trully incorporated at its [ Kernel ] level ( and not like an optional third party module as the HP 49/50g one, which lacks complete integration with their respective Kernel, since HP 49/50g does not have native support for Longfloats ).

  • Is it possible to insert numerical indicators in 3D picture

    Hello,
    Let's say I have a *.wrl file which contains a room drawing.  Take into account that I know how manipulate the SceneObject and display it into 3D picture.  Is it possible to position different temperature indicators (numerical indicators) in the 3D Picture indicator, so that when I move around the room in the 3D picture the indicators follow there respective position (while updating their values) ?
    Thanks,
    Michel
    Solved!
    Go to Solution.

    A trick that I know is to get the image of the control you want and apply texture to a plane. I did this below:
    In short what I did is:
    1. Create a room using a box. Make it transparent and blend with other objects
    2. Create a plane (a box with y = 0.001) and apply texture to it. The texture is the image of the control (the temperature control)
    3. Do the scene and change the image (texture) as the value changes
    4. close references.
    Here is the code as a reference (using LV 2013). Does that work for you?
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    Thermometer.vi ‏34 KB

  • RMA 생성시 CREDIT PRICE가 EXTENDED PRECISION이 적용되지 않는 문제

    제품 : MFG_OE
    작성날짜 : 2003-05-16
    RMA 생성시 CREDIT PRICE가 EXTENDED PRECISION이 적용되지 않는 문제
    =======================================================
    PURPOSE
    Original Order를 참조하여 RMA 생성시 Credit Price가 extended precision이 적용되지 않는다. 일반 user들은 이 상황을 문제로 제기하지만 이는 현재 standard function이며 11,11i 동일하게 design 되어 있다.
    Explanation
    Currency standard precision = 2, Extended precision = 5 로 정의되어 있
    고, Prifle option-unit price precision type이 'Extended', OM(OE)에서
    사용하는 price list rounding factor = -2 인 경우.
    Order 생성시 selling price = 1.63200으로 입력,
    이 order를 참조하여 RMA를 생성하면 Credir price = 1.63000으로 조회된다.
    이 경우 대부분의 고객은 RMA credit price가 orginal order의 selling price
    인 1.63200 으로 조회되는것이 맞는 function이라 생각하나, 현재 design은
    extended precision 과 무관하게 사용한 price list rounding factor 값을
    기준으로 credit price를 입력하고 있다.
    다음은 bug 1316874에 developer가 update한 내용이며 이는 11i에서도 동일
    하게 적용된다.
    If Customer wants to see the price of the item up to 3 decimal place,
    they should NOT make the rounding factor of the Price List -2.
    Instead they should set the rounding factor as -3.
    If the OE:Unit price Precision Type is EXTENDED and Extended Precision is 5, then it would be logical to set the rounding factor of Price List as -5 only, in order to avoid any rounding off.
    While displaying the unit price, OE takes care of both Precision
    and Price List Rounding Factor.
    I checked both Sales Order form and RMA forms and the behavior is same.
    Even the original price at discount screen (RMA form) also displayed
    the price rounded to the price list rounding factor.
    All of the fields show price in EXTENDED precision (as desired) and
    round off the price to the PRICE LIST ROUNDING FACTOR (as desired).
    결론적으로 OM(OE)의 보여지는 price 자리수는 extended precision을 따르지만,price의 round off는 price list rounding factor에 따라 결정된다.
    Example
    Reference Documents
    bug 1316874

  • HT6114 I just updated the last version of OS X Mavericks on my Mac Pro and my Thunderbolt display is not working correctly

    I just updated the last version of OSX Mavericks on my MAc Pro and my thunder bolt display is not working correctly. Could you please help

    Reset the NVRAM/PRAM and Reset the SMC, then try again.

  • Acrobat Reader 9 does not display Type 3 fonts correctly

    Acrobat Reader 9 does not display Type 3 fonts correctly for quite a few of our older, PDF version 1.2 PDF files in our products, where normal Acrobat or Digital Editions show no such problem. It only shows the bottom part of the glyphs but then shifted to the top of the glyph area.
    Files available for test/reference upon request.
    Rob van Fucht
    Elsevier

    Hmm, this cannot be, as this is legacy material from 1997. There is no way that this can be changed using Type 1 or OTF fonts other than retypesetting everything from scratch, I fear, and that will be just too much expensive work. Interestingly, Acrobat Reader 8 and the latest Adobe Digital Editions display these PDFs correctly, so I have no alternative other than assume that the changes in the font rendering mechanism in Reader 9 are responsible for this. I am checking these files with Acrobat 9 Professional shortly...
    Rob

  • Convert binary bytes to Labview Extended Precision type

    Hello All:
    I am reading a binary file that was written in Windows. One of the types used in the data structure
    is the Delphi extended precision type, which is 10 bytes. When reading this in using Labview's
    "read binary file" VI, there is only one choice, and that is to read it in as an array of 10 bytes
    (Labview's extended precision is 16 bytes.) I have tried using the type cast with no results.
    So....how to convert the data in the 10 byte array to a 16 byte extended precision format in
    Labview? I guess part of the problem is not really understanding how the extended precision
     type is stored in IEEE format.
    Has anyone performed this conversion before that could help out? I'm sure this must have
    been done by someone....somewhere....I have no hair left....
    Any help would be appreciated!
    Thanks,
    Gary.

    Uhm, something must have gone wrong, the link TST sent,
    mentions that LabVIEW stores extended data as 80 bit (10 bytes) on Intel platform.
    Complex double is stored as two doubles (=16 byes). My guess is that Altenbach's latest note mentioning the endianess should help you.
    If the endiannes is right you should be able to just typecast the data:
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Some browser doesn't display the MW page correctly

    after installing Maintenance Wizard 2.17, some browser doesn't display the MW page correctly, some menu function is missing. The display problem is not for everyone, some user's browser have no problem. Some user's IE are displaying it correctly. i.e. one user has both IE and firefox working, however, after she clear her java cache, both browser refuses to display the MW page correctly.
    The resolution of PCs is set to the same value. however, the size of the text isn't. after changing the size of the text, some of our pc start to work. The display web page for MW doesn't show the right most menu item. After resize the screen, we find it is because of the blue frame for the MW page that stop to dynamical stretch up to 20 inches.
    The menu item is been streched out of the blue frame, they are no longer displayable
    any ideas?

    We have the same problem.
    And find it is caused by a combination of your screen resolution, font size and browser window size.
    The blue frame that displays the Oracle Mainentance Wizard banner doesnt dynamical strech to the full window size.
    After experiment with it, MW can display much better in our case.

  • Convert double precision float string to a number

    I am a newbie with Labview.
    I have a GPIB link with a vector voltmeter and I receive the data as a double precision float string (IEEE standard 754-1985). I would like it to be recognized as a number, but I can't find the proper conversion function. The string to convert is 8 byte long. Does anyone have an idea how to do it? Thank you!

    Asumming your data is big-endian, you should be able to simply typecast it to a DBL (see attache LV 7.0 example).
    (It is possible that your DBL string is little-endian, in this case it will be slightly more complicated. Let us know )Message Edited by altenbach on 05-27-2005 04:49 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StringToDBL.vi ‏23 KB

  • Display no longer fits correctly on the desktop

    I don't know what I did, but the display no longer fits correctly on the desktop.
    I have to scroll from side to side or up and down to see the entire desktop.
    I went to system preferances Displays and the closest I can get to fitting the desktop to the screen is 1024X680 , but even my desktop pic won't fit on the screen .

    Thank You Charlie, I found this first and it worked:System Preferences>Universal Access, Seeing tab and turn off Zoom.
    But your information is also helpful.
    Thanks for helping

  • Cover flow is not displaying greatest hits albums correctly.

    Cover flow is not displaying greatest hits albums correctly.
    To reproduce this, I have deleted all of my music out of itunes and sync'ed to my ipod - (160gb classic). At this point it is empty. Then I have loaded three greatest hits cds into itunes. (From mp3s that I have encoded). All are tagged with:
    - Name of track
    - Album Artist
    - Artist
    - Album Name
    - Track #
    - Compilation flag is off
    - all tracks have the correct artwork
    Each of the albums have the same name = Greatest Hits.
    The artist name and album artist is different for each of the three albums.
    itunes shows each of the three albums seperately.
    When I sync to the ipod, coverflow on the ipod shows only one album cover. (The cover of the first artist alphabetically.) All of the songs from all of the albums
    Music->Artists lists the three artists correctly.
    Music->Albums lists one album (incorrectly) and All songs (45 songs)
    Setting sort-album to a unique value for each album e.g. Artist 1-GH, Artist 2-GH does not change anything.
    Any ideas that don't involve changing the names of the albums slightly by capitalisation or adding spaces or adding the artist's name?
    Thanks

    dpr99 wrote:
    Any ideas that don't involve changing the names of the albums slightly by capitalisation or adding spaces or adding the artist's name?
    Nope. See my post on Grouping Tracks Into Albums for a run down of the various issues. Short of waiting for a firmware fix you'll have to use one workaround or another. My preference is *Album - Album Artist* as this clearly shows which album is which when scanning for albums in the three panel browser.
    tt2

  • Single Precision Floating Point Numbers to Bytes

    Ok here is some code that i have written w hile back with some help from the support staff. It is designed to take in precision floating point numbers that are stored as 4 bytes and convert then to a decimal value. It works off of a udp input string and then also reformats the string. I have the ability to look at up to 4000 parameters from this one udp string. But now what i want to do is do the opposite of what i have written, and also perhaps get rid of the matlab i used in it as well. What i would like to be able to do is input a decimal value and then have it converted in to the 4 byte groupings that make up this decimal nd then have it inputed back in to a single long string witht hat grouping of bytes in the right order. A better explanation of what was done can be found on this website
    http://www.jefflewis.net/XPlaneUDP_8.html
    as the original code followed the "Single Precision Floating Point Numbers and Bytes" example on that site but what i want to do is "Going from Single Precision Floating Point Numbers to Bytes". The site also explains the udp string that is being represented. Also attached is the original code that i am trying to simply reverse.
    Attachments:
    x-plane_udp_master.vi ‏34 KB

    Perhaps what you are doing is an exercise in the programming of the math conversion of the bytes.
    But if you are just interested in getting the conversion done, why not use the typecast function?
    If the bytes happen to be in the wrong order for wherever you need to send the string, then you can use string functions to rearrange them.
    Message Edited by Ravens Fan on 10-02-2007 08:50 PM
    Attachments:
    Example_BD.png ‏3 KB

  • I have an array of clusters of 4 numeric indicators and i want to plot 2 of them in a xy graph for the entire array? How can you seperate out 2 of the indicators of each cluster for the entire array

    I have keithley 238 SMU, which when used in sweep mode returns the value in a array of cluster of 4 numeric indicators of which 2 are voltage and current and other two are step size and delay....I want to plot
    I-V curves, how to do that?

    Hello aby
    this could be a possible solution to separate 2 values from an array of 4 elements clusters an create 2 arrays suitable for graphing.
    Hope it helps.
    Alipio
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    a_solution.vi ‏24 KB

  • Extended precision variable declaratio​n in formula node?

    I'm looking for a way to define my variables inside my formula node as extended precision but everytime I attempt this, I get an error.  To my understanding, the declaration should be "long double" but it does not seem to work.  Anyone have any ideas?
    Greycat

    Thanks Dennis ... I guess sometimes it seems quicker to ask instead of looking... but then I found what you were referencing very quickly.  Just being lazy I suppose!!!  Anyway, thanks for the help.
    Greycat

  • Website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10

    website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10

    Can you post a link?
    Then we can take a look.

Maybe you are looking for

  • Entry tax posted in Gr & excluded in IR. How to clear open item in Entry Tax Clrng gl??

    Hi Experts, Issue is as below. Material Po Value 1000 Entry Tax value        10 Grn Posted with entry tax hence accounting entry as below Material Stock Gl Dr 1010 Gr Ir                                  Cr 1000 Entry Tax Clrng                 Cr    1

  • I moved to a new computer and need to transfer my settings

    How do I transfer all of my settings with my pictures in a catalog to a new computer.  On the old computer photos were located in C:\data\Pictures.  On the new computer they are located in d:\data\pictures.  When I open my 2014 catalog it does not fi

  • Regarding the payment block workflow trigger

    Hi Gurus 1. All the invoices should be posted with payment block u201CZu201D (customized) where it is not already populated by MIRO with standard u201CRu201D. 2.Everyday the accountant of the concerned section will run the payment proposal (Automatic

  • Nokia e72 email with low battery

    Hi i have a nokia e72 with two mail boxes. I want to have the mailboxes always connected, but i cant find the option to stays connected with low battery. In my previous phone (nokia e71) i have this option, any help? tanks

  • Prepayment Claim error

    Hello all, I am trying to create a prepayment claim and getting two error's - 1. Prepaid amount is missing  2. Fund is not allowed according to fund determination settings. This inspite of entering the prepaid amount and having the standard fund dete