Le Thu, Apr 28, 2011 at 10:08:34PM +0700, Phuong Vo a écrit :
> 2011/4/28 Jean Christophe André <[email protected]>:
> > What exactly is the problem here?
> There is no problem here, and that caused the problem, a heated online
> debate about the result (1 or 9). I find it interesting that gcalctool
> returns 1 for the result though.

How do you make it answer 1 except when adding parenthesis?

I've just tried these:
* 6÷2×(1+2)   => 9
* 6÷2(1+2)    => 9
* 6÷(2(1+2))  => 1
* 6÷(2×(1+2)) => 1

But I'm using gcalctool 6.0.1 (from Natty)…
May be it has been corrected since then?
-- 
Jean Christophe ANDRÉ  —  Coordonnateur des infrastructures techniques
Agence universitaire de la Francophonie (AUF)  —   http://www.auf.org/
✉ : AUF, 21 Lê Thánh Tông, T.T. Hoàn Kiếm, Hà Nội, Việt Nam
℡ : +84 4 38247382  ✦  ℻ : +84 4 38247383  ✦  Cellul. : +84 91 3248747
⎧Note personnelle: merci d'éviter de m'envoyer des fichiers Microsoft⎫
⎩Office, cf http://www.gnu.org/philosophy/no-word-attachments        ⎭
_______________________________________________
POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines
_______________________________________________
HanoiLUG mailing lists: http://lists.hanoilug.org/
HanoiLUG wiki: http://wiki.hanoilug.org/
HanoiLUG blog: http://blog.hanoilug.org/

Trả lời cho