Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

shoneill

Active Participant

03-23-2005 10:21 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

about the "old" challenge VIs, where are they available? I've looked for them, but I haven't been able to find any since the forum moved. I can't find them on the official "coding challenge" page, and the old forum discussions I can't find.....

Shane.

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

BruceAmmons

Trusted Enthusiast

03-23-2005 10:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

When I went back and looked at the code, it looked overly complex. I think several things could have been simplified without affecting the time much. However, it does provide a start for the bigint manipulation.

Bruce

Bruce Ammons

Ammons Engineering

Ammons Engineering

Ray.R

Knight of NI

03-23-2005 11:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

10000 digits.. You mean that you will pass it a number whose string lenth is 10,000??? As in a huge number??

Or do you mean the input number is 10 000 max. ?

> > lost in translation < <

JLV

______________________________________________________________________

BruceAmmons

Trusted Enthusiast

03-23-2005 01:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Bruce

Bruce Ammons

Ammons Engineering

Ammons Engineering

alkazaa

Member

03-23-2005 01:25 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Bruce submitted already his solution from the previous challenge, but anyway, here is the link to past challenges: http://www.ni.com/devzone/lvzone/codingchallengearchive.htm

Regarding the algorithms, I also use a Newton-Raphson iteration for the root finding. I did not come up with bigint division algorithm, but use another Newton-Raphson to calculate the inverse of a bigint.

The bigint multiplication Bruce (and some others including me) used in the factorial challenge employs a fast Fourier transform. For me it was surprising to learn at that time that an FFT would help with a bigint multiply. It is not that surprising, though, since if you look at it, the multiplication of two long decimal numbers with the naive school-arithmetic approach is formally equivalent to a convolution. The FFT based bigint multiply is known as the Strassen-Schönhage algorithm, AFAIK.

Franz

Ray.R

Knight of NI

03-23-2005 01:25 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

And I would drop the lookup table idea..

Interesting challenge, though... (DoH!)

😄

______________________________________________________________________

altenbach

Knight of NI

03-23-2005 01:37 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Bruce,

@Bruce Ammons wrote:

I am using the Newton-Raphson method to find the root.

Interesting. In my casual testing, Newton-Raphson is a bit problematic with pure integer math. Are you doing anything special?

BruceAmmons

Trusted Enthusiast

03-23-2005 01:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I'm not really doing pure integer math, either. My bigint representation still uses DBLs to represent each piece of the integer.

Bruce

Bruce Ammons

Ammons Engineering

Ammons Engineering

BruceAmmons

Trusted Enthusiast

04-19-2005 01:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

My final time is about 18 msec to calculate the square root of a 10000 digit number. This is the slowest root to calculate. My average time for randomly generated numbers is about 3.5 msec.

Anybody else getting good times?

Bruce

Bruce Ammons

Ammons Engineering

Ammons Engineering

shoneill

Active Participant

04-20-2005 01:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

18 ms sounds like a pretty good result. Having not taken part in the Vampire number challenge either, I don't think I'd get anywhere close to this in the next 3 months or so......

Looking forward to the results

Shane.

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)