From kde-edu Thu Aug 08 12:25:31 2002 From: Sebastian Stein Date: Thu, 08 Aug 2002 12:25:31 +0000 To: kde-edu Subject: Re: [kde-edu]: unified kde-edu style? X-MARC-Message: https://marc.info/?l=kde-edu&m=102880962623881 Uwe Thiem [020808 14:16]: > > there's also an algorithm to convert decimal numbers of infinite > > length, but with a repeating part ( which means the decimal > > representations of all rational numbers ) into fractions... I think > > the idea was to divide the repeating part by a number which you write > > down as x 9's where x is the length of the repeating part ( that's the > > best i can explain it in english :). E.g. 0,111... would become 1/9 > > . 0.1212... would become 12/99 etc. This is the way they explained > > it to us in high school, i'm sure there's an easy way to write this > > down in code... > > With a being your periodical decimal number and n being the length of the > period, you multiply a by 10^n and then subtract a: > > a = 0.1111111 > > 10a = 1.1111111 > > 9a = 1 > a = 1 / 9 Oh, I see. It is really very easy. I could implement this, but I think I will wait to see how the idea of a common MathApp will develop. Steinchen -- KBruch: application to automatically generate tasks with fractions Package: KDE Edu in KDE 3.2 (http://edu.kde.org/kbruch/) CVS: kdeextragear-1/kbruch State: finished CVS Snapshot: http://www.hpfsc.de/download/kbruch-0.20.tar.gz _______________________________________________ kde-edu mailing list kde-edu@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-edu