Maximum size of a floating-point number

Morning all,
Does anyone know what the maximum size of a floating point number can be under Solaris 8 running on
a V880?
Regards,
Richard Breckon

I'm not sure what you're asking.
The maximum size is 128 bits.
The maximum value is as given in /usr/include/float.h: 1.189731495357231765085759326628007016E+4932L

Similar Messages

  • Determining whether an integer is a floating-point number

    I want to create a program that when an integer is input into the numeric constant, a floating-point number with all zeros to the right of its decimal point will light the LED on the front panel. The LED will remain unlit for any other floating-point number. I know I want to use a Round to Nearest function, but not sure where to go from there. 

    rtufaro wrote:
    I want to create a program that when an integer is input into the numeric constant,
    You mean CONTROL, right?
    You just need a type of rounding.  Doesn't matter if you round up or down.  So you just round and then compare the input to the rounded value.  If they are equal, you light up your LED.  So all you need is a numeric control, 2 functions, and a boolean indicator.

  • How to restrict the decimal place of a floating point number?

    Hi,
    Here is my code:
    public void TwoDecimal(double u){
         String w = Double.toString(u);
         int c = w.length();
         System.out.println(c);
         if (c <= 5)
            double a = Double.parseDouble(w);
            System.out.println(a);
         else
            System.out.println("Invalid input!");
      }I want to show a floating point number which has 2 digits and 2 decimal places, e.g. 45.82, 29.67. This number is input by user and passed as a parameter.
    For those case like the above sample floating point numbers, it can display the proper value of 'c'. e.g. 45.67 will display 5.
    However, when I passed 99999, it will show 7; 9999 will return 6, not 5.
    So, if the user does not input the '.', does it append 2 implicit chars to it? i.e. 99999.0 and 9999.0. So, that's why it returned 7 and 6 for the length of the string respectively.
    How can I fix it?
    and
    Does it has better algorithm?
    Pls advise.
    gogo

    When dealing with a known precision, in your case hundredths, it is often a good idea to use an integer type and add in the decimals on printing only. This is often the case in banking systems. Almost all of them use integer types, (read long) in pennies to store monitary values. Ever seen someone type in a value for a credit card machine? For something like $20 they press.. "2" "0" "0" "0" The machine knows the lowest denomonation in a cent, so it knows where to put the decimal place. I suggest you do something like this. It also helps to avoid base 2 round off errors.
    -Spinoza

  • X64 Asm floating point number adressing .

    Dear Community
    Please kindly inform us about the number offloating-point
    addressing mode x64 Asm
    Best Regards
    Rafał Bator

    Hi RB_1,
    Your issue is out of support range of VS General Question forum which mainly discusses
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    You post the issue in this thread:
    https://social.msdn.microsoft.com/Forums/en-US/78825b09-d948-4676-a343-1791bad36603/asm-codnig-floating-point-number?forum=vcgeneral
    so I will remove this thread. Please discuss your issue on that thread or opening new thread on Visual C++ forum.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Floating point Number & Packed Number

    Hai can anyone tell me what is the difference in using floating point & packed Number .
    when it will b used ?

    <b>Packed numbers</b> - type P
    Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can use type P data for such values as distances, weights, amounts of money, and so on.
    <b>Floating point numbers</b> - type F
    The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
    You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
    Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
    reward if useful

  • Check Floating Point Number

    Hello All,
    I am having some trouble checking the value of a field with Key Figure type Number with 8 byte floating point. I want to read that field and populate another field with an X if true. For example if that field is equal to 5,0000000000000000E+07 then i want to mark the other field with an 'X'.
    The problem is in my code, how do i read that number in the fltp field, such as the number above. my code reads as follows for the 'X' field.
        if SOURCE_FIELDS-abc123 eq 5000000.
          RESULT = 'X'.
        endif.
    Thanks everyone in advance

    You don't need to worry about converting the code into standard format or floating, just implement your code as you want and it will automatically take care of the conversion. Basically 5,0000000000000000E+07 = 50,000,000.
    thanks.
    Wond

  • Maximum size of XML files and number of IDocs for IDoc receiver adapter

    Hi Guys,
    We have an XML file to IDoc scenario where XI picks up an XML file with multiple Customer records in it, it does a simple mapping and creates one DEBMAS06 IDoc per record in the XML file. All IDocs are sent in a single file in XML-IDOC format to IDoc adapter which then posts the separate DEBMAS IDocs to R/3.
    a) What is the maximum size of XML files that XI can handle with mapping involved ?
    b) What is the maximum number of IDocs in a single file that the receiver IDoc adapter can handle ?
    The first time this interface runs almost 200,000 Customer records will be exported in one XML file.
    Thank you.

    Hi,
    Well it is difficult to find out the  maximum Size of xml messgaes that can be processed by XI and also Maximum number idocs an recevier Idoc adapter can handle.
    This totally depends on your production system loads and the limits can be set totally on trail & error basis..
    In my heavy loaded production system, i found out that the maximum size of the successfull messages after processing by XI is around 75 MB (seen in transaction SXMB_MONI). Whereas messages with size around 100 MB went into error.
    I havent encounter any such limits with respect to Idocs.
    I would suggest that you divide your data into smaller chunks and sent it part by part instead of sending it all once since you data size is huge.
    You can vary your batch size as per your system load.
    Regards,
    - Deepak.

  • Exception with floating point number

    I get the following message if i try to import a floatingpoint number (12.12 is the number).
    oracle.xml.sql.OracleXMLSQLException: 'java.lang.NumberFormatException: 12.12' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    I4ve tested anything with '.', ',' NLS-Parameters and so on.
    The Bugfix is now to multiply the number with 100. It4s not fine, but it works.
    Thanks in advance,
    Oliver Friedrich
    null

    Hello,
    this is a short piece of my code. I think there is all information you need.
    Greetings
    Oliver Friedrich
    String xmlControl = "CONTROL"; // XML tag
    String dbControl = "XML_CONTROL"; // Database table
    OracleXMLSave saveObject = new OracleXMLSave(conn, dbControl);
    saveObject.setRowTag(xmlControl);
    saveObject.setIgnoreCase(true);
    saveObject.setDateFormat("yyyyMMdd");
    int count = saveObject.insertXML((Document)docImport);
    XML-File:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
    <CONTROL>
    <NUMBER>12</NUMBER>
    <COST>123.45</COST>
    </CONTROL>
    </ROOT>
    Database-Table
    desc XML_CONTROL
    Column Name Null? Type
    NUMBER NUMBER(12)
    COST NOT NULL FLOAT(32)
    null

  • Floating point number to IBM bytes

    Hello,
    I'm trying to convert a float value to a byte array (but in IBM standard).
    I understand that the general idea will be the following algorithm:
    1. process the sign, exponent and fraction from the float value (using IBM standard)
    2. build the bytes from the S, E, F from step 1.
    So far, I only have the step 2 like this:
    public static byte[] toBytesIbm( int signBit, int exponent, long fraction ) {
    byte[] bytes = new byte[4];
    bytes[0] = (byte)(signBit + exponent);
    bytes[1] = (byte)((fraction & 0x00FF0000) >> 16);
    bytes[2] = (byte)((fraction & 0x0000FF00) >> 8);
    bytes[3] = (byte)(fraction & 0x000000FF);
    return bytes;
    Getting the sing bit is also not a problem, so the real work is in getting the exponent and fraction from the number. I don't know how to do this. I have code from a trusted source to convert from IBM bytes to IEEE float numbers, so I can check if the bytes are correct.
    Can anyone help me with this?
    Thanks in advance

    Brushfire wrote:
    Thanks for the correct. I'm never quite sure about the masks, but I've had issues with extra data being introduced before, so I like it better safe than sorry. The mask is needed when a narrower primitive has been sign-extended to a wider primitive, and you want to keep the result unsigned.
    But in this case, the result is then cast to byte, which removes all the upper bits that the mask was trying to set to zero in the first place.
    If you need to store a byte in an int without sign-extension, you need a mask:
    int n = someByte & 0xFF;If you want to store the lower 8 bits of an int in another int, you need a mask:
    int lowerEight = someInt & 0xFF;But if you want to store the lower 8 bits in a byte, just cast:
    byte lowerEight = (byte)someInt;

  • Floating point number using Modbus RTU DSC LV 8.2

    I'm reading temperature from a Modbus conrolled device. I need to convert a temperature value (17053) read as a double type Shared Variable (SV) and convert it to ieee 754 type to show temp of 79 deg F as shown on the control front panel.
    I'm using DSC module LV 8.2. I'm wondering if the conversion is already done in DSC LV 8.5???

    seem to find my own answers after putting the post....
    I use a typecast to single but I had to change the double to 16 bit integer for the type cast to convert correctly.... see attached png
    Attachments:
    ModbusSVFloat.PNG ‏28 KB

  • How to make floating point division

    I have tried many alternatives but i couldnt make any single floating point number printed to a page...
    I am compiling the servlet with eclipse 3.2 without any error but the jsp page says      java.lang.NoSuchFieldError: floatnumber even i have that variable...
    i have tried double,float but both of them makes the error above...but i can print long as well.
    can anyone teach me to divide 2 integer values and print the exact result like;
    3 / 5 = 0.6

    can anyone teach me to divide 2 integer values and
    print the exact result like;
    3 / 5 = 0.6
    int a= 3, b= 5;
    double result= ((double)a)/b;... or any valid variation thereof.
    kind regards,
    Jos

  • Floating Point Representations on SPARC (64-bit architecture)

    Hi Reader,
    I got hold of "Numerical Computation Guide -2005" by Sun while looking for Floating Point representations on 64 bit Architectures. It gives me nice illustrations of Single and Double formats and the solution for endianness with
    two 32-bit words. But it doesn't tell me how it is for 64-bit SPARC or 64-bit x86.
    I might be wrong here, but having all integers and pointers of 64-bit length, do we still need to break the floating point numbers and store them in lower / higher order addresses ??
    or is it as simple as having a Double Format consistent in the bit-pattern across all the architectures (Intel, SPARC, IBMpowerPC, AMD) with 1 + 11 + 52 bit pattern.
    I have tried hard to get hold of a documentation that explains a 64-bit architecture representation of a Floating Point Number. Any suggestion should be very helpful.
    Thanks for reading. Hope you have something useful to write back.
    Regards,
    Regmee

    The representation of floating-point numbers is specified by IEEE standard 754. This standard contains the specifications for single-precision (32-bit), and double-precision (64-bit) floating-point numbers (There is also a quad-precision (128-bit) format as well). OpenSPARC T1 supports both single and double precision numbers, and can support quad-precision numbers through emulation (not in hardware). The fact that this is a 64-bit machine does not affect how the numbers are stored in memory.
    The only thing that affects how the numbers are stored in memory is endianness. SPARC architecture is big-endian, while x86 is little-endian. But a double-precision floating-point numer in a SPARC register looks the same as a double-precision floating-point number in an x86 register.
    formalGuy

  • 128-bit floating point numbers on new AMD quad-core Barcelona?

    There's quite a lot of buzz over at Slashdot about the new AMD quad core chips, announced yesterday:
    http://hardware.slashdot.org/article.pl?sid=07/02/10/0554208
    Much of the excitement is over the "new vector math unit referred to as SSE128", which is integrated into each [?!?] core; Tom Yager, of Infoworld, talks about it here:
    Quad-core Opteron? Nope. Barcelona is the completely redesigned x86, and it’s brilliant
    Now here's my question - does anyone know what the inputs and the outputs of this coprocessor look like? Can it perform arithmetic [or, God forbid, trigonometric] operations [in hardware] on 128-bit quad precision floats? And, if so, will LabVIEW be adding support for it? [Compare here versus here.]
    I found a little bit of marketing-speak blather at AMD about "SSE 128" in this old PDF Powerpoint-ish presentation, from June of 2006:
    http://www.amd.com/us-en/assets/content_type/DownloadableAssets/PhilHesterAMDAnalystDayV2.pdf
    WARNING: PDF DOCUMENT
    Page 13: "Dual 128-bit SSE dataflow, Dual 128-bit loads per cycle"
    Page 14: "128-bit SSE and 128-bit Loads, 128b FADD, 128 bit FMUL, 128b SSE, 128b SSE"
    etc etc etc
    While it's largely just gibberish to me, "FADD" looks like what might be a "floating point adder", and "FMUL" could be a "floating point multiplier", and God forbid that the two "SSE" units might be capable of computing some 128-bit cosines. But I don't know whether that old paper is even applicable to the chip that was released yesterday, and I'm just guessing as to what these things might mean anyway.
    Other than that, though, AMD's main website is strangely quiet about the Barcelona announcement. [Memo to AMD marketing - if you've just released the greatest thing since sliced bread, then you need to publicize the fact that you've just released the greatest thing since sliced bread...]

    I posted a query over at the AMD forums, and here's what I was told.
    I had hoped that e.g. "128b FADD" would be able to do something like the following:
    /* "quad" is a hypothetical 128-bit quad precision  */
    /* floating point number, similar to "long double"  */
    /* in recent versions of C++:                       */
    quad x, y, z;
    x = 1.000000000000000000000000000001;
    y = 1.000000000000000000000000000001;
    /* the hope was that "128b FADD" could perform the  */
    /* following 128-bit addition in hardware:          */
    z = x + y;
    However, the answer I'm getting is that "128b FADD" is just a set of two 64-bit adders running in parallel, which are capable of adding two vectors of 64-bit doubles more or less simultaneously:
    double x[2], y[2], z[2];
    x[0] = 1.000000000000000000000000000001;
    y[0] = 1.000000000000000000000000000001;
    x[1] = 2.000000000000000000000000000222;
    y[1] = 2.000000000000000000000000000222;
    /* Apparently the coordinates of the two "vectors" x & y       */
    /* can be sent to "128b FADD" in parallel, and the following   */
    /* two summations can be computed more or less simultaneously: */
    z[0] = x[0] + y[0];
    z[1] = x[1] + y[1];
    Thus e.g. "128b FADD", working in concert with "128b FMUL", will be able to [more or less] halve the amount of time it takes to compute a dot product of vectors whose coordinates are 64-bit doubles.
    So this "128-bit" circuitry is great if you're doing lots of linear algebra with 64-bit doubles, but it doesn't appear to offer anything in the way of greater precision for people who are interested in precision-sensitive calculations.
    By the way, if you're at all interested in questions of precision sensitivity & round-off error, I'd highly recommend Prof Kahan's page at Cal-Berzerkeley:
    http://www.cs.berkeley.edu/~wkahan/
    PDF DOCUMENT: How JAVA's Floating-Point Hurts Everyone Everywhere
    http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf
    PDF DOCUMENT: Matlab's Loss is Nobody's Gain
    http://www.cs.berkeley.edu/~wkahan/MxMulEps.pdf

  • Precision operation (Float point) on FPGA 2011

    Dear Experts....
    For my application I have to perform demodulation operation on FPGA. I want to store an array of double precision number. When I am trying to perform any double precision number operation I am getting this error "Wire:Type not supported in current target" From forums I came to know that on FPGA  in Labview 2011 I cannot have double precision operation. What is alternative?? Please help me with this. Due to this issue my work has been delayed due to this problem..
    Thanks... Kindly guide...
    Solved!
    Go to Solution.

    Dear Mathan, thanks for your reply.... I have already gone throught the link you sent, but for my application I have to have array of floating points number. I can not have integer numbers. Here I have attached my vi. I have to mix a signal of 20 Mhz with sin and cos signal to achieve demodulation. So for Sin and Cos values I have to have floating point. Is ther any way to overcome this problem?
    Attachments:
    fpga.vi ‏30 KB

  • F suffix for floating point.

    Okay, I'm a proficient c++ programmer and have been learning Java for only a few weeks now.
    I have a question about the f suffix for floating point varibles such as float f = 3.14f;
    The f suffix casts this as float right? which is the same as float f = (float) 3.14; Correct?
    Why do we have to add the f suffix in the first place? Doesn't the compiler know that we want a float and not a double? (single-precision 32-bit instead of double precision 64 bit) I really do not understand the concept here or why they need the f suffix.
    Can someone explain?

    ThePHPGuy wrote:
    The f suffix denotes that the literal is of a floating-point type.Yes. The d suffix does the same.
    Java has two different types of floating-point numbers.Right.
    The type double is the default type.Right.
    The float type can have a double and a float literal. Is this true or false?No. At least not in any way I understand it.
    I think you're confusing two things:
    "floating point number" is any number in the IEEE floating point format.
    "float" is a datatype holding a 32bit floating point number.
    "double" is a datatype holding a 64bit floating point number.
    floating point number literals can be either double literals (without suffix or if the "d" suffix is used) or float literals (when the "f" suffix is used).

Maybe you are looking for

  • How to configure Security services in OSB 11g..

    We are integration OSB with BANK application, we will be using SSL certificate for the same. Please help how to configure security policy in OSB. I checked below link policy defination http://tim.blackamber.org.uk/?p=825 but in OSB proxy service we a

  • Delivery Note Qty Not populated to MIRO

    Hi, During MIGO GR, I have enter Qty in Unit of Entry: 1pc however I enter Del. Note Qty as 20 kg. In MIRO, the Del. Note Qty is not populated. It's value is 0 ? Anyone please kindly advice. Thanks

  • Unexpected exception while copying binary to target

    1st time i run linux app under SDK, it copy the .elf fine to the board, but when i try run the 2nd time it give me " Unexpected exception while copying binary to target" doesn't matter i reset/cycyle the power for the board.

  • Jsp taglib problem

    Hello all, as i am facing problem to display the value inside the table. following are the flow files of my code. my jsp page............ <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> <tr> <td> </td> <td nowrap><b>Client</b></td> <td><c ut value=

  • How to turn off auto update in numbers?

    G'day, working with a large spreadsheet... is there any way to turn off auto-update in Numbers? cheers Mark