 |
|
 |
Parabéns por esta biblioteca.
Era justamente o que eu estava querendo fazer mas notei que ainda falta uma função SQR para calcular raizes cúbicas, quartas, quintas, etc.
PS: Excuse me for to write in portuguese but i am not good in English.
|
|
|
|
 |
|
 |
First of all I would like to thank Stephan for sharing the project with us, it really helped me in a school project.
When substracting a number from zero the resulting number`s sign doesn`t get updated. For example if you have 0 - 5, it will return 5.
Quick fix:
in BigNum_Ad_Sub.cs,
method: static public void Sub(BigNumber src, BigNumber dst, BigNumber result)
if (src.signum == 0)
{
BigNumber.Copy(dst.Neg(), result); //get the negative of dst
return;
}
|
|
|
|
 |
|
 |
Hello, I was testing the code to see if it was usefull to do perform the calculations needed to calculate the private key from the public key in a deffie-hellman key exchange. But the function POW doesn't seem to accept verry large exponents witch is needed to do those calculations. (the exponent needs to be a 4096 bit random number) Am i right? Thanks
|
|
|
|
 |
|
 |
I want to compute the 2-log of the number of distinct subsequences of strings, varying in lengths from 100 up to 400. Although the alphabets are mostly small (appr. 10), these numbers are collossal hence the 2-log easily exceeds 2^100.
Hence, ArbitraryMath seems exactly what I need. Therefore, it is quite frustrating that I do no succeed in linking it to my application, wherever I put the dll. Adding a link to ArbitraryMath and a "using ArbitraryMath" causes the compiler to tell me that it cannot locate ArbitraryMath. The same procedure works well for other well known dll's such as Mapack and ZedGraph.
Anyone able to help me out? I would be very grateful.
modified on Wednesday, November 25, 2009 10:35 AM
|
|
|
|
 |
|
 |
Try right clicking on the assembly and choosing 'unblock', this sometimes happens on W7 when downloading assemblies from the internet
|
|
|
|
 |
|
 |
This looks like what I need
I added the ArbitraryMath.dll to my project as a reference, added a "using ArbitraryMath;" to the application but then the compiler says it cannot find ArbitraryMath. Somehow it doesnt't seem to work so I am doing something wrong. What
|
|
|
|
 |
|
 |
Displaying the BigNumber using ToFullString doesn't put the sign back onto the string.
Negative numbers therefore appear positive...
So I added
if (atm.signum < 0) { res = res.Insert(0, "-"); }
to the bottom of the ToFullString function.
The ToString function seems to work fine, however.
Great work. Please keep updating here if there are any more bugs.
I'm working on a modulus function, and adding a Trunc function as well.
|
|
|
|
 |
|
 |
Have you tested your lib against any other library, (performance and result) to see if it works fine, and foolproof.
Another thing to keep in mind is that BigInt is a solid release (originally created in Java and ported effortlessly into C#)
MS also has a version, which is quite similar.
Inside them you can find many poor and other best quality random generators.
Also the more interesting operations, needed by criptography are exponentiation modulus N Modulus GCD GCM, like :
C = (A^B)(mod C)
good work! I'll give it a try.
|
|
|
|
 |
|
 |
Hi, excellent article.
I see you are interested in fractals. Are you aware of the old DOS freware fractal program Fractint? You can download the program and sourcecode from www.fractint.org. There is a lot to learn from the source code. The help file contains very much interessting fractal info.
|
|
|
|
 |
|
 |
Hi. Thanks for the info. I will check out the page.
|
|
|
|
 |
|
 |
Please consider the folowing:
Your library will be far faster if you operate over an uint[] array instead of a byte[]
Instead of ToFullString(), you can implement ToString(string format), just like regular numberic types.
It will be more explanatory if you show your sample's output in your article
Best regards,
Jaime.
|
|
|
|
 |
|
 |
Thank you for your inputs. I will consider that for the next release.
|
|
|
|
 |
|
 |
(I use MAPM for statistical calculations to prevent accumulated errors)
I have warpped the orignal MAPM in c with c++\cli wrapper and operator overloading, but had a slight problem with getting exceptions from the c code.
actually writing the whole thing in c# is better.
Any way , You got my five
pita2009
|
|
|
|
 |
|
 |
I like it, thank for this!
Anthony
Check out my desktop conversion software for Windows -
www.universalconverter.net
|
|
|
|
 |
|
 |
...but some theoretical background (just the basics) would be nice.
Something like how a BigNumber looks inside and some implementation details.
However, thx for sharing.
|
|
|
|
 |
|
 |
Hi!
I am going to write some more info and theoretical background as soon as I got some time.
Just keep updated.
|
|
|
|
 |
|
 |
Although, I'ven't went through the code in detail as of now, but still I would like to get clarified about few things:
1. I implement a similar kind of library for implementing a mpint (multi-precision integer) arithmetic which was needed for our proprietary ssh protocol stack, at that time, initially I went through the OpenSSL's bignum to get an idea how to play with. Is your data structure is very much like OpenSSL's standard?
2. Do you have all the conversion mechanism in-place? like - (a) bn2BigNum (b) bignum2bn (c) hex2bn (d) bn2hex etc?
3. Have you also implemented the random and/or psedo-random algorithm for your Bignum either?
Please advise,
Best Regards,
T.S Chowdhury
|
|
|
|
 |
|
 |
Hi!
ad 1) I am not commen with SSL's bignum implementation. Sorry
ad 2) What do you mean with bn2BigNum? I habe no hex conversions yet. But it is a good idea.
ad 3) No pseudo random numbers yet. I have an old 19937 pseudo rng somewere on my hd. Perhaps I am going to put it into the library.
|
|
|
|
 |
|
 |
Hi,
bn2BigNum means "Binary to Bignum" conversion and vice-vesra,
what happens in real life scenario, say in ssh protocol stack, whenever you use an algorithm like "Diffe-Hillman" and/or "Cipher Block" all the encoded string is in Binary format (which are also quite long), we need to have a bn2BigNum() API's almost all the time.
Hope this will helps.
Your rest of the answer is ICE-CLEAR.
Wonderful job. I would please to get in touch with such a brilliant mathematician / programmer. Could you please send me an email to tchowdhury80@gmail.com with your yahoo/gtalk/skype id for further references?
Thanks,
T.S Chowdhury
|
|
|
|
 |