Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

Ah..........got it!

I had looked at the old posts again and tried to use a-z<0.000000001, but that didn't work although I thought it would. However, your ABS fixed it.

Thanks!

*EDIT:* I've altered the code I posted.

*Last edited by phrontister (2012-11-24 01:50:59)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Does it work better or does it still only get there for the interval you had?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

It's just as fast and gives exactly the same result as my original code, which is accurate to 15 digits only. I don't know how to get more digits than that in LB.

What do you mean by "interval"?

*Last edited by phrontister (2012-11-24 02:04:06)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I wrote an LB program for it, and unless my initial guess is between 33.886745 and 39.999999, LB goes crosseyed.

Must you still enter between those two numbers?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

Hi Bobby,

Yes. If I enter >=40 or <=33.886744, LB gives a Runtime Error.

Btw, the interval isn't precise...it's truncated so it fits into the 'Prompt' window (see image) that opens when starting the program.

*Last edited by phrontister (2012-11-24 03:05:10)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

SQR(1600-x^2)

This line is causing some of that.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

Do you mean both denominators in that line?

And what about the derivative line?

I might try my code on the polynomial that I posted in the other thread...but maybe the bogus roots might be an issue (just a thought).

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

No...I can't try it on the polynomial, because I don't know how to get the derivative.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

SQR(1600-x^2)

When x is greater than 40 then x^2 is greater than 1600. So when you subtract something bigger than 1600 from 1600 you get a negative number. LB does not know how to deal with the square root of a negative number.

SQR(1600-x^2)

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

Oh, of course. I don't know what to do about that, other than to give the polynomial a try.

That will have to wait until tomorrow, though. I'm off to bed now.

See you later, Bobby.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Okay, see you tomorrow.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

One question, Do any of you use the POV-Raytracer?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi Agnishom;

I am sorry, I do not?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Hmm...Okay..No Problem

I had been thinking to use it to generate Fractals

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

There are some nice fractal programs out there. I used to use fractint.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Is it free to download?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I believe it is or at least it used to be.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Let me see ...

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

This program is for DOS and I think I won't be able to run it properly

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

They have windows versions but they are 16 bit and I can not run them.

Check these out:

http://fractice.sourceforge.net/index.html

http://www.eclectasy.com/Fractal-Explorer/

http://element90.wordpress.com/software/downloads/

http://hsfractal.sourceforge.net/

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Wow! these are nice

By the way, I tried hsfractal today morning, and found that it works on my 32bit machine

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Very good! Have fun with it.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Thanks for the links you provided

Among those, which one is your favorite and which is the second favorite?

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

I'm not crazy, my mother had me tested.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

I am a little partial to the one that drew those pictures. They are amazing.

The HS fractal is the one I like the least. All the rest I think are better but that is up to

you to decide.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,600

Hi Bobby,

phrontister wrote:

bobbym wrote:I wrote an LB program for it, and unless my initial guess is between 33.886745 and 39.999999, LB goes crosseyed.

Must you still enter between those two numbers?

Yes. If I enter >=40 or <=33.886744, LB gives a Runtime Error.

This LB program on RosettaCode.org that finds the roots of a function is different from mine, and asks for a range for x (ie, separate minimum and maximum values).

For the polynomial function no upper and lower limits seem to be required, but the result is a couple of decimal places less accurate and it also finds a bogus root.

I found a derivative online (I didn't know how to do them) for the polynomial, but my LB program hangs for some reason. Debugging revealed a couple of things that I tried to iron out, but to no avail. I'll leave it there, though...I'm losing interest with this one.

Offline