Store Very Large Numbers

Hello,
I am trying to find some info about how to store very large numbers with like 2000 digits or even more and do calculations on them.
Does anyone have any info or links about this ??
Thanks.

BigDecimal?Speaking. What can I do for you?
:)

Similar Messages

  • Very Large Numbers Question

    I am a student with a question about how Java handles very large numbers. Regarding this from our teacher: "...the program produces values that
    are larger than Java can represent and the obvious way to test their size does not
    work. That means that a test that uses >= rather than < won?t work properly, and you
    will have to devise something else..." I am wondering about the semantics of that statement.
    Does Java "know" the number in order to use it in other types of mathematical expressions, or does Java "see" the value only as gibberish?
    I am waiting on a response from the teacher on whether we are allowed to use BigInteger and the like, BTW. As the given program stands, double is used. Thanks for any help understanding this issue!

    You're gonna love this one...
    package forums;
    class IntegerOverflowTesterator
      public static void main(String[] args) {
        int i = Integer.MAX_VALUE -1;
        while (i>0) {
          System.out.println("DEBUG: i="+i);
          i++;
    }You also need to handle the negative case... and that get's nasty real fast... A positive plus/times a positive may overflow, but so might a negative plus a negative.
    This is decent summary of the underlying problem http://mindprod.com/jgloss/gotchas.html#OVERFLOW.
    The POSIX specification also worth reading regarding floating point arithmetic standards... Start here http://en.wikipedia.org/wiki/POSIX I guess... and I suppose the JLS might be worth a look to http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html

  • Maximmum value of a sequnec and viewing very large numbers

    Hi,
    We have a table which has a column populated using a sequence - it is maintained by code in owb but growing at larger rate than expect
    e.g sequence starts at say 10000000000, would expect next row to b created with 10000000001 but large gap in between.
    Have a separate ticket raised with oracel for this as mainatined via dimesnion opertaor code.
    However, have couple of questions reagrding sequences.
    1) How large can they be
    2) If we try query numbers which over 14 digits long starts to show e in the tool we are using (pl/sql developer) Is there a way to ensure we can see the whole number (sqlplus?) and
    I'm assuming say if had number column which very large say 18 digits long joined to another table 18 digits long then no issues?
    Thanks

    1. you really should read docs.
    e.g sequence starts at say 10000000000, would expect next row to b created with 10000000001 but large gap in between.Not necessarily. Oracle Sequence guarantees uniqueness, not continuity.
    There can be gaps by design. Especially if CACHE of the sequence is big.
    Have a separate ticket raised with oracel for this as mainatined via dimesnion opertaor code.you really should read docs before creating tickets.
    However, have couple of questions reagrding sequences.
    1) How large can they be-As large as NUMBER datatype can be - 38 digits.-
    I am wrong. Doc says - 28 digits.
    2) If we try query numbers which over 14 digits long starts to show e in the tool we are using (pl/sql developer) Is there a way to ensure we can see the whole number (sqlplus?) What is printed on screen is a matter of formatting. You can choose formatting you like in SQLPlus and SQLDeveloper
    I'm assuming say if had number column which very large say 18 digits long joined to another table 18 digits long then no issues?No issues.
    Edited by: Mark Malakanov (user11181920) on Apr 10, 2013 2:06 PM

  • Very large numbers on screen

    The numbers on my phone at times become so large that they won't all fit on the screen.  The only thing I can do is turn it off and back on for them to be a normal size again.  Sometimes it is almost impossible to turn it off because the area you have to swipe isn't showing on the screen. This has started happening pretty often.  Anything I can do to stop this?

    Turn off Zoom.
    General - Accessibility - Zoom - OFF

  • Power of function with very large numbers & HEX array

    Hello,
    I'm haveing 3 problems and I would be greatful if someone can help. I've attached
    1) I need to calculate 982451653^15. I've used 'Power of X' function but the resut I'm getting is incorrect.
    is there a way for getting correct result??
    2) after that I need to calculate modulo from result but I get nothing? I'm using 'Quotient & Reminder' function
    3) I need to transform number 982451653 to HEX --> 3A8F05C5 and send to array gruped by two from behind as shown below:
    3A8F05C5 --> [3A][8F][05][C5] and write it down to array from behind.
    Array should be:
    ...and for hex number 3A8F05C56 --> [03][A8][F0][5C][56]
    Array: 
    Please help!
     

    Just for "fun", I decided to take my own suggestion and write a Big Number project to handle Addition and Multiplication of Arbitrarily-Long Integers.  I built in "sign" handling for Multiplication, but (in the interest of getting a "testable") I currently only support non-negative Addition (and no Subtraction, yet -- it should be a fairly easy, and you'll forgive the accidental pun, Add-On).  The Project has 11 sub-VIs, including Product, Sum, and Power, plus one designed for output called "Big Number String" (currently only a Decimal string is supported).  I was not necessarily "coding for speed of execution", but rather for clarity of operation and ease of "proving that this works".
    I tried it out on your problem.  I got out a 135-digit decimal number that appears to match what you posted as the Correct Answer (it starts with 76677477 ... and ends with ...35294157).  It executes in about 20 milliseconds.
    Just for fun, I also coded up a computation of 10000! (after reading Altenbach's post).  I was not aware of the Factorial Challenge, and haven't look at the Post he cited, so am unsure how my algorithm compares with the 100-millisecond champ.  I'm definitely slower -- about 37 seconds, and while I didn't print out the result, I got 35,660 digits, one more than what is noted in Christian's Post.  However, you can Google Factorial 10000 and find its value posted on the Web -- my answer agrees with the posted value for the first (most-significant) 20-or-so digits that I compared.
    For the time being, I'm going to skip over how to convert this monster decimal string representation of a number to a hex representation -- my suspicion is that it will be easier to write a Hex Package to do the same calculation (and to define an inherently Hexy format to store the arbitrary-precision number) than to try to write a direct Conversion routine.  I'll leave this task (as well as creating one's own Big Number Project) as an "Exercise for the Reader".  Consider this an Existence Proof.
    Bob Schor
     

  • Screen goes to very large numbers

    Screen goes to different languages and large numbers

    Check Settings > General > Accessibility > all options should be OFF here.
    Note: You might need 3 fingers to navigate.

  • How to store very large music collection

    I have nearly 10,000 albums that i would like to rip and get rid of. right now i have 60,000 songs ripped, and i'm running several la cie 800-400 hard drives through a hub. that works pretty well, but i can see i'm on the road to too many hard drives if i'm really going to do this (plus i have to back up the entire collection).
    does anyone have any good ideas as to what i should do? i'm at a loss, other than keep on buy more hard drives. but i don't think that's going to work. please advise if you can.

    I dont really think there is a good solution yet. Gtkpod is clumsy and slow with big libraries (10000+ songs) and gnupod had its own set of issues. It started grouping artists that started with "The" under "T" as opposed to the iTunes/Gtkpod way of ignoring "The" and place it with whatever letter followed. I found that far too annoying.

  • Using very long/large numbers

    Hi, I want to know how to "store" and use very large numbers.
    For example, say I had:
    double n = 1.23456789101112131415;
    or:
    double n = 123456789101112131415
    I know that they are too big for using double, so how would I be able to store it; and even more importantly round it ,preferably using "Math.round," to 15 decimal places?
    i.e. tell it to do this:
    n = 1.23456789101112131415;
    number = Math.round((1000000000000 * n) / 1000000000000 .0);
    System.out.println(number);

    As much as your "advice" helps, the java docs provide
    only methods for the BigDecimal/Integer
    objects. They don't show complete syntax, and don't
    contain examples. Fortunately, I have avoided the
    "35-years-old-and-still-living-in-my-mother's-basement
    -and-aren't-even-professional-programmers" path and
    have enough of a life that I try not to spend all day
    reading about Java syntax.I don't believe this. Morgalr gave you genuine help. You spent more time criticizing him than conducting a very simple google search sucha as "BigInteger"+"example". I would suggest a little attitude adjustment if you still want people to help you next time.

  • Profile Performanc​e and Memory shows very large 'VI Time' value

    When I run the Profile Performance and Memory tool on my project, I get very large numbers for VI Time (and Sub VIs Time and Total Time) for some VIs.  For example 1844674407370752.5.  I have selected only 'Timing statistics' and 'Timing details'.  Sometimes the numbers start with reasonable values, then when updating the display with the snapshot button they might get large and stay large.  Other VI Times remain reasonable.
    LabVIEW 2011 Version 11.0 (32-bit).  Windows 7.
    What gives?
     - les

    les,
    the number indicates some kind of overroll.... so, do you have a vi where this happens all the time? Can you share this with us?
    thanks,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Using SRM for very large contracts and contract management

    We are doing an SRM 7.01 implementation project. SRM will be used primarily for outsourced contract management. The contracts are all services associated with facilitites (plant) maintenance and also support services like cleaning or catering.
    They have very large numbers of items priced individually (e.g. 10,000) per contract. The items price depends on the location the work is expected to be performed. The location is represented in SAP RE-FX architectual object. The price can be priced at any level of the hierarchy e.g. service A is priced the same across the whole state but service B is priced per campus.
    q1. SAP advises that there are performance limitations on SRM contracts >2000 lines. Has anyone experience in a solution to provide very large contracts in SRM? How did you do it please?
    q2. SAP advises to use the plant to represent the location for pricing purposes, but this would result in a very large number of plants. Has any one experience in alternative solutions to for variable location pricing in SRM contracts please? I.e. like integrating the RE-FX architectural object or similar into contract and PO line items.
    thanks very much

    Hi Prakash,
    SRM does provide the facility of contract management with the help of Purchase Contracts and Global Outline Agreements but it is used as part of the sourcing for materials and services. The materials or services have contracts against some given target value against which PO is released. The contract is based on a material number ( eithe material or a service) which will be used as a source of supply during the creation of the Shopping Cart. It might not really fit in the scenario of carrier and freight forwarders but still can be customized for this kind of use.
    The contract management functionalities in the R/3 space can also be looked on for this purpose.
    Reg
    Sachin

  • Large numbers and has been locked. The screen tells me to contact iTunes.

    I have an iPhone 5S 32.
    I was trying to write my code but the numbers in the screen showed very large numbers so I tried several times and it was blocked.  The message in the screen tells that i have to contact Itunes.
    reneefroncusco.

    If you are disabled from entering the passcode wrong too many times, you will need to restore through iTunes on your computer then reload your most recent backup.

  • Factorial of Large Numbers

    Hi,
    I want to calculate factorials of very large numbers. However numbers greater than 83 do not produce the actual results. The below function is the one that I use
    create or replace function FN_FACTORIAL(p_num IN INTEGER)
    RETURN NUMBER
    AS
    p_fact NUMBER :=1;
    i INTEGER;
    BEGIN
         if(p_num = 0)
         then
              return 1;
         else
              for i in 1..p_num
              loop
              p_fact := p_fact*i;
              end loop;
         end if;
         return p_fact;
    END;
    I know the number data type exceeds its precision and hence it does not work. Can you give me a work around. I cannot use BINARY_INTEGER or BINARY_FLOAT as well since I use Oracle 10g.
    Thank you in advance.
    Regards,
    Prithwish.

    Ok. Here is the problem that I am facing. Below is my Oracle table which contains population sizes. What I am trying to do is generate a table with sample size from the population using hyper geometric rule. The output would generate sample sizes from the following table to a different table. I want to calculate the hyper geometric powers from 1 to population size for each field and then lookup the samples from the corresponding power generated. below is the output
    Col1
    Col2
    Col3
    200
    100
    200
    120
    200
    40
    50
    30
    20
    25
    56
    114
    Sample Output for column 1 row 1 of value 200:
    Col1
    Col2
    1
    0.9982
    2
    0.9976
    200
    0.9143
    I have a fixed power of 0.9976 which I have to lookup. Then I would require the value 2 placed at the first row of my new table. Similar process follows for all the data. So basically I require the hyper geometric function done in PL/SQL.
    Let me know if you need further inputs to the problem.
    Thanks

  • Numbers file sizes very large

    I've noticed that file sizes in Numbers are very large. I was using Excel for a long time and all the files I created were between 20-30KB. The files consisted of an Excel workbook, with 1-2 worksheets in it. The same files in Numbers are 200-300KB and if I save them over the network from another computer to my computer, they jump up to over 1MB. Any ideas on this?

    Hello
    Nothing to do with graphics items.
    An XL file as well as an AppleWorks one is a compiled document in which many components are stored in a very compact shape. One byte was sufficient in AW to represent an operand as they where aboutone hundred.
    In Numbers, everything is described in pure text with complementary delimiters.
    When a formula uses the operand "COUNTBLANK" this one appears with its 10 letters.
    In XL as well as in AW6, a date is stored as a floating number while in Numbers it's stored as the string "mercredi 23 janvier 2008 22:33:19"
    Sama thing for every attributes of every cell.
    So this results in a huge file store in XML format. To spare space, when we close a document, the XML file is packed in .gz format.
    This is the Index.xml.gz file that we may see clicking a Numbers document wit ctrl depressed and selecting the contextual menu item "Show Package's contents".
    Double click onto Index.xml.gz will unpack it.
    giving the expanded Index.xml file.
    I assumes that they are applications dedicated to XML files.
    I don't know them so I just drag and drop the XML file onto a free text editor named Bean which I find really interesting.
    Doing that, we may examine the file's contents.
    If someone knows a correct free application able to open and display correctly the XML files, I'm interested
    Yvan KOENIG (from FRANCE mercredi 23 janvier 2008 22:49:23)

  • Operations on very large binary numbers

    Hi guys,
    I'm trying to write a java class for manipulations of very large binary numbers.
    I'm representing the BN internally as boolean[] (array of booleans false for 0 & true for 1).
    I want to write an algorithm for the following operations :
    shifLeft (boolean[] b,int n) : shifting binary number to left by n positions.preferably a circular shift .
    and also the corresponding shiftRight() method.
    can some one guide me on how to implement this ?
    thanks.

    Consider an array of ascii chars....
    array =>   | |a|b|c|d|
    offset = 1
    len = 4In the above there are actually five spots in the
    array but the offset points to the second position in
    the array and the length is 4.
    If I was to extract the value it would be "abcd"
    because of the offset and the length.
    Now a 'shift right' means that if it is "abcd" then
    it should now be "abc" (because the d fell off the
    end.)
    I can do that like this.
    array =>   | |a|b|c|d|
    offset = 1
    len = 3Notice in the above that nothing changed except the
    length. But because the length changed if I
    extracted the value I would get "abc" because the
    offset is 1 and the length is three.
    Notice also that there was no array copying.Are you sure shifting works like that ?
    what I know about left shifting is that the 'd' should be moved left -toghether with a, b, c- and we append a 0 in place of 'd' .
    from what you said the 'd' would be gone , or am I again wrong ?
    it seems i still didn't get any satisfactory answer to this problem...

  • Any suggestions on calculating with very large or small numbers?

    It seems that double values are about 17 decimal places (10e17) in precision.
    Is there a way in iPhone calculations to get more precision for very large and small numbers, like 10e80 and so forth? I know that's more than the entire number of atoms in the universe, but still.
    I tried "long double" but that didn't seem to make any difference.
    Just a limitation?
    Thanks,
    doug

    Hmmm... maybe I was just having a problem with my formatted string then?
    I was using the NSString %g format, which is supposed to print in exponential notation if the number is greater than 1e4 or less than 1e-4, or something like that.
    But I was not getting anything greater exponents than 1e17 and then I was apparently getting overflows because the number were having negative mantissas.
    All the variables involved were double...
    How did you "look at" z?
    Thanks,
    doug

Maybe you are looking for

  • How to move pics from camera role to photo stream?

    How to move pics from camera role to photo stream?

  • ABAP proxy (Client proxy)

    Hi all, Could you provide an insight onto how the ABAP proxy on the client side works? What i want to know is, 1. How do we trigger the proxy. (in case of file -> abap proxy , when ever we pick the file and once the message is inside the XI and sent

  • How to get failed tasks list for a user in OIM.

    Hi All, Can anybody please suggest me a way to get list of task that got failed(when a user trying to provision to a resource) in OIM using java code. Thanks in Advance. SP.

  • Transferring music on the ipod back to a Mac

    I am using a Shuffle and love it. I have all my data on my IBM PC and now am using a G4. I really want to just download my shuffle playlist into the established iTunes on the Mac but it doesn't seem quite as easy as plug and play. Any suggestions for

  • Limiting  Discount to customers

    Hello, We have four discount condition types in our pricing prodcedures with 2%, 3%, 7% and 4% discount.  We want system to limit the  total discount to 10% at any time to our customer . How this can be acheived  and pls advice on the complete  confi