[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] bc und mathematisches problem



Am 2008-02-06 18:34:01, schrieb Heimo Ponnath:
> Hallo Michelle,
> 
> Am Sonntag 03 Februar 2008 19:31 schrieb Michelle Konzack:
> > die "0" zurückgibt, wenn eine Zahl
> > durch eine andere Zahl geteilt wurde und das resultat ein INTEGER ist
> > sowie "1" bei einem FLOATINGPOINT.
> 
> Was für eine Art Zahlen sind Divisor und Dividend? Ganze Zahlen oder Zahlen 
> mit Nachkommastellen?

Sind nur ganzzahlen.

> Ich kenne die bash nicht so gut wie Du, aber ist da nicht eventuell eine 
> Division ohnehin eine Fließkomma-Operation? Das Ergebnis ist ja dann in jedem 
> Fall eine Fließkommazahl, nur daß sie dann, wenn der Bruch aufgeht, von der 
> Form x,000irgendwas (je nach Genauigkeit der Berechnung) ist.

Bei BaSH gibt es keine "Fließkomma"

Ich mache es jetzt mit    echo "3%2" |bc    , also "modula".

Thanks, Greetings and nice Day
    Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: