Math Is Fun Forum

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

You are not logged in.

#1 2006-08-09 13:18:38

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Decimal to Fraction Converter

An automatic Decimal to Fraction Converter. Does it work for you?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#2 2006-08-09 13:32:20

Zhylliolom
Real Member
Registered: 2005-09-05
Posts: 412

Re: Decimal to Fraction Converter

Is it supposed to be just a white box with an entry field for a number and an output box for the decimal?

Edit: Ok, when I hit the "." key everything shows up. Is it supposed to only show up after that happens? It gives me correct answers.

Last edited by Zhylliolom (2006-08-09 13:35:00)

Offline

#3 2006-08-09 14:02:25

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Decimal to Fraction Converter

Did you use the euclidean algorithm to find the gcd?  If you didn't, doing so would drastically speed things up.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#4 2006-08-10 01:55:16

Patrick
Real Member
Registered: 2006-02-24
Posts: 1,005

Re: Decimal to Fraction Converter

seems to be working fine


Support MathsIsFun.com by clicking on the banners.
What music do I listen to? Clicky click

Offline

#5 2006-08-10 06:14:49

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: Decimal to Fraction Converter

MathsIsFun wrote:

An automatic Decimal to Fraction Converter. Does it work for you?

It sure does. It'll be pretty useful for homework or just for fun, or for some other purpose. Nice work, especially with the text design for the title of it.

Offline

#6 2006-08-12 17:55:13

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Decimal to Fraction Converter

Ricky wrote:

Did you use the euclidean algorithm to find the gcd?

Well of course ... ummm ... not. So I do now!

Thanks, Ricky it is a better tool now.

Bug patrol on the new version anyone? (I already know it looks pretty silly with long decimals.)

Oh, and Zhy ... I put an "example 1.25" as it *was* pretty unclear what to type.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#7 2006-08-12 20:28:13

Zhylliolom
Real Member
Registered: 2005-09-05
Posts: 412

Re: Decimal to Fraction Converter

Wow, the Euclidean algorithm sped this up exponentially. It works a lot better now, it instantly gives the answer.

Offline

Board footer

Powered by FluxBB