Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 498 results for
biginteger
- Page 1
BigInteger implementation C++
Programming
Software Development
12 Years Ago
by subith86
… for this. 1. std::string private member will hold the
BigInteger
in the form of string. 2. Addition : [INDENT] a.…gt; #include <string> #include <sstream> class
BigInteger
{ private: //////////////////////////////////////////////////////////////////////// // The big integer will be stored as a …
BigInteger - modpow()
Programming
Software Development
15 Years Ago
by vsha041
…/1.4.2/docs/api/java/math/
BigInteger
.html#modPow%28java.math.
BigInteger
,%20java.math.
BigInteger
%29"]http://java.sun.com/j2se…/1.4.2/docs/api/java/math/
BigInteger
.html#modPow%28java.math.
BigInteger
,%20java.math.
BigInteger
%29[/URL] It allows us to answer…
Re: BigInteger isProbablePrime
Programming
Software Development
12 Years Ago
by Jaggs
…void main(String[] args) {
BigInteger
num1 = new
BigInteger
("3511"); isPrime(num1);
BigInteger
num2 = new
BigInteger
("3512"); isPrime(num2);… } static void isPrime(
BigInteger
bi) { if (bi.…
Re: BigInteger isProbablePrime
Programming
Software Development
12 Years Ago
by softDeveloper
… number. I've tried a Fermat's test: [CODE] while (!(
BigInteger
.ONE.compareTo(b) <= 0 && b.compareTo(n… with the value '1' I always get this 'expResult.equals(
BigInteger
.ONE)' as true considering it as not composite and possible…
BigInteger isProbablePrime
Programming
Software Development
12 Years Ago
by softDeveloper
Hi all, I'm checking for primality in
BigInteger
type. I'm using isProbablePrime with certainty 15. I would like to know how to test if a
BigInteger
is really a prime number. Thanks in advance.
Re: BigInteger Limit
Programming
Software Development
10 Years Ago
by Labdabeta
… decimal digits. As such I would not be surprised if
BigInteger
COULD calculate it. The thing is that if you start… longer than the age of the earth to compute. Obviously
BigInteger
frankly will be unable to deal with this, and even….org/list/2013/06/?page=1) and at that point
BigInteger
probably will be too slow for the task at hand…
Re: BigInteger Limit
Programming
Software Development
10 Years Ago
by JamesCherrill
The API shows the nuber of bits in a
BigInteger
to be both set and returned as an int, so … 50! is less than 300 bits - a trivial size for
BigInteger
.
BigInteger Limit
Programming
Software Development
10 Years Ago
by Kuroshi
The question is pretty straightforward, does
BigInteger
have a limit? From what I know it is only limited to the amount of memory available on the system, nothing else. This question arose when my instructor told me that one could not calculate 50! using BigIntegers, which I believe one can. I would appreciate an answer. Thank you.
Re: BigInteger?
Programming
Software Development
13 Years Ago
by Momerath
Does your project include a reference to the System.Numerics.DLL? Do you put "using System.Numerics;" at the top of you file? I have no issues accessing the
BigInteger
class with VS 2010.
Summation Program with BigInteger Rational Class
Programming
Software Development
10 Years Ago
by thewayoftheduck
…); //create
BigInteger
numerator1
BigInteger
numerator1 = new
BigInteger
("1"); //create
BigInteger
denominator1
BigInteger
denominator1 = new
BigInteger
("2"); //create
BigInteger
numerator2
BigInteger
numerator2 = new
BigInteger
("99…
Re: Operations using BigInteger operations
Programming
Software Development
14 Years Ago
by chaospie
…: [code] public static
BigInteger
factorial( int n ) {
BigInteger
factorial = new
BigInteger
( "1" );
BigInteger
temp; for ( int …i = 1; i <= n; i++ ) { temp = new
BigInteger
( Integer.toString( i ) ); factorial = factorial.multiply( temp ); } return …
Re: Operations using BigInteger operations
Programming
Software Development
14 Years Ago
by chaospie
… a String because the constructor for [icode]
BigInteger
[/icode] takes a String representation of a number. … takes an int, and turns it into a [icode]
BigInteger
[/icode]. [code] // This works, it turns i …String, which is what one of the
BigInteger
constructors takes int num = 1;
BigInteger
test = new
BigInteger
( Integer.toString( num ) ); //…
A function that returns a BigInteger
Programming
Software Development
14 Years Ago
by iamsmooth
… my functions has to be: "public static
BigInteger
fNumberRoutes( int n, int m )" So…29: cannot find symbol symbol : class
BigInteger
location: class CountRoutes2 public static
BigInteger
fNumberRoutes( int n, int m ){… Maybe I don't completely understand what a
BigInteger
is, but I copied the assignment's signature…
Re: A function that returns a BigInteger
Programming
Software Development
14 Years Ago
by jmaat7
… have to make an object first to use
BigInteger
. I think the return 0 is throwing it… off, b/c it needs to return a
BigInteger
. If its setup in the signature, you need… example: [code=java] public static
BigInteger
fNumberRoutes( int n, int m ){
BigInteger
bigIntegerObject = new
BigInteger
("123"); return bigIntegerObject; }…
Re: how to copy BigInteger?
Programming
Software Development
15 Years Ago
by Alex Edwards
…/javase/6/docs/api/java/math/
BigInteger
.html[/url] [code=java] import java.math.
BigInteger
; public class TestingBigInteger{ public static …void main(String... args){
BigInteger
first = new
BigInteger
("50");
BigInteger
second = new
BigInteger
(first.toString()); System.out.println(first); …
how to copy BigInteger?
Programming
Software Development
15 Years Ago
by phalaris_trip
…... can someone explain to me how I can make a
BigInteger
object to make it have the same value as another…
BigInteger
object? That is they have to have the same value … around this by doing something like
BigInteger
foo = bar.add(
BigInteger
.ZERO); where bar is another
BigInteger
Thanks a lot, I've been…
Re: A function that returns a BigInteger
Programming
Software Development
14 Years Ago
by iamsmooth
Yeah, the line I posted is 29 so that's where the problem was. I didn't import it, but now I did and it says I can't return 0. Can anyone give me an explanation of how to work
BigInteger
? It's a class so I need to create a
BigInteger
object?
Operations using BigInteger operations
Programming
Software Development
14 Years Ago
by pateldeep454
My code: [CODE] package big; import java.math.
BigInteger
; public class Main { public static void main(String[] args) {…variable nBig and fBig that convert x and n to
BigInteger
. Also how do i modify the return value for …the pow method to
BigInteger
which means changing the type for the i variable …
Re: A function that returns a BigInteger
Programming
Software Development
14 Years Ago
by jmaat7
did you import the math api? import java.math.
BigInteger
; "cannot find symbol" usually means that you didn'…
Re: how to copy BigInteger?
Programming
Software Development
15 Years Ago
by destin
Just wondering... why do you want to do this? The
BigInteger
class is immutable, so two instances sharing memory will never be a problem.
Re: Operations using BigInteger operations
Programming
Software Development
14 Years Ago
by chaospie
Always remember, the Java API is your greatest weapon! :) [url]http://java.sun.com/j2se/1.5.0/docs/api/java/math/
BigInteger
.html[/url]
Re: String to BigInteger conversion.
Programming
Software Development
12 Years Ago
by ~s.o.s~
… first using Long.parseLong() and then convert the long to
BigInteger
using
BigInteger
.valueOf(long val)[/quote] This won't work if… range, which is one of the main motivation for using
BigInteger
... [quote]thanks dear it worked, but isn't there any…
Re: String to BigInteger conversion.
Programming
Software Development
12 Years Ago
by dantinkakkar
Convert it to [icode]long[/icode] first using [icode]Long.parseLong()[/icode] and then convert the [icode]long[/icode] to [icode]
BigInteger
[/icode] using [icode]
BigInteger
.valueOf(long val)[/icode]. Cheers! :)
Convert string "aA" to a BigInteger
Programming
Software Development
18 Years Ago
by kedklok
hi, i was wondering if someone can help me. i am trying trying to convert a string containing aA into a
bigInteger
Value. i've read about it but have no idea how to implement it in java. thanks in advanced, K
Re: Convert string "aA" to a BigInteger
Programming
Software Development
18 Years Ago
by iamthwee
[QUOTE=kedklok]hi, i was wondering if someone can help me. i am trying trying to convert a string containing aA into a
bigInteger
Value. i've read about it but have no idea how to implement it in java. thanks in advanced, K[/QUOTE] This makes no sense. Care to elaborate?
String to BigInteger conversion.
Programming
Software Development
12 Years Ago
by adil_bashir
Can anyone help me to convert String to
BigInteger
. please
Re: String to BigInteger conversion.
Programming
Software Development
12 Years Ago
by ~s.o.s~
In what way is the
BigInteger
constructor which accepts a string not working out for you?
String division by integer, without converting string into biginteger.
Programming
Software Development
10 Years Ago
by ShivaRJ
… String like "12345695123547895236412578963214563214578952144531214553362511455224555", without converting this string into
BIGINTEGER
format, divide that string with a integer value...... input String…
Large numbers without using BigInteger
Programming
Software Development
9 Years Ago
by redtribal23
Is there a way to calculate large numbers without using
BigInteger
? I am calculating an exponent without using the math class.
Re: BigInteger implementation C++
Programming
Software Development
12 Years Ago
by VernonDozier
To my mind, I can't see any reason to use a string as storage. As you mentioned, in order to use it at all, you have to constantly convert it back and forth. A vector of unsigned ints and a bool for the sign seems better. Just think of it as doing math in base 4294967296. Each unsigned int is a "digit" ranging from 0 to 4294967295, …
1
2
3
9
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC