GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2008-01-19 15:59:29

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

People expect credit for a damnedest things.

Man, this guy has got to be kidding.

So, I've made a small program (40.9 KB, GM7.gif ) that finds a certain Fibonacci Number.
I hope it's usefull and you will learn from it.
...
Please note:
If you use the code in your game, you must credit Chor.

The miraculous code in question:

repeat (placeholder - 1) {
finu = var1 + var2
var1 = var2
var2 = finu
}

http://gmc.yoyogames.com/index.php?showtopic=353290


Abusing forum power since 1986.

Offline

#2 2008-01-19 16:43:47

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: People expect credit for a damnedest things.

I can't even articulate words to describe what I'm feeling.

Offline

#3 2008-01-19 19:14:13

$pecter
Member
From: Australia
Registered: 2008-01-18
Posts: 9

Re: People expect credit for a damnedest things.

Maybe he only just learned that at school? I've seen worse.

I'm sure there are still people running around on the GMC thinking that their

draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);

is 'God's gift to game making!'
or that combining a few functions counts as a script.
eg.

//draw_set_everything(color,alpha,font,halign,valign)
draw_set_color(argument0);
draw_set_alpha(argument1);
draw_set_font(argument2);
draw_set_halign(argument3);
draw_set_valign(argument4);

Offline

#4 2008-01-19 20:09:53

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

Re: People expect credit for a damnedest things.

Hehehe, Yourself busted the guy. I thought the claim of the 92nd Fibonacci number was bullshit. When I did a version of this script, I think I found that GM7's precision could only handle the first 77.


Abusing forum power since 1986.

Offline

#5 2008-01-19 21:01:26

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: People expect credit for a damnedest things.

Technically you just have to find the first Fibonacci number greater than 2^53.  The 80th Fibonacci number (14472334024676221) is that number.  That's the highest it can accurately represent.  I tested it (by adding 1 to it and seeing if it changed).

Offline

#6 2008-01-20 06:20:22

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

Re: People expect credit for a damnedest things.

That script I posted is actually only accurate to the first 75. Rounding errors with the power function cause the Lucas form to fail at that point. I wonder if those 5 other numbers are worth switching to an iterative method.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB