Re: Floating point exception - gdb

1999-10-31 Thread Juergen Leising
On Wed, Oct 27, 1999 at 06:21:57PM -0500, Chris Costello wrote: > On Thu, Oct 28, 1999, Juergen Leising wrote: > > #0 0x806b7ab in menu_check_recenter (menu=0x8e20fe8) at menu.c:287 > > 287 menu->top += menu->pagelen * ((menu->current - menu->top) > > / menu->pagelen); > >Try these

Re: Floating point exception - gdb

1999-10-28 Thread John E. Davis
Chris Costello <[EMAIL PROTECTED]> wrote: >print menu >print menu->pagelen >print menu->current >print menu->top >print menu->pagelen I think that you can also use: (gdb) p menu (gdb) p *menu --John

Re: Floating point exception - gdb

1999-10-27 Thread Chris Costello
On Thu, Oct 28, 1999, Juergen Leising wrote: > #0 0x806b7ab in menu_check_recenter (menu=0x8e20fe8) at menu.c:287 > 287 menu->top += menu->pagelen * ((menu->current - menu->top) > / menu->pagelen); Try these: print menu print menu->pagelen print menu->current print menu->top print

Re: Floating point exception

1999-10-25 Thread John E. Davis
David DeSimone <[EMAIL PROTECTED]> wrote: >> And you could avoid the division with: >> >> (info->lobin + info->hibin + info->ascii)*4 >> < ((info->lobin + info->hibin)*3 + info->ascii)*3 > >But then you risk integer overflow. Which the division helps avoid, and >in fact, floating-point hel

Re: Floating point exception

1999-10-25 Thread Vincent Lefevre
On Mon, Oct 25, 1999 at 17:00:29 -0500, David DeSimone wrote: > > (info->lobin + info->hibin + info->ascii)*4 > > < ((info->lobin + info->hibin)*3 + info->ascii)*3 > > But then you risk integer overflow. If this is the case, with the other integer version too... > Which the division hel

Re: Floating point exception

1999-10-25 Thread David DeSimone
Vincent Lefevre <[EMAIL PROTECTED]> wrote: > > And you could avoid the division with: > > (info->lobin + info->hibin + info->ascii)*4 > < ((info->lobin + info->hibin)*3 + info->ascii)*3 But then you risk integer overflow. Which the division helps avoid, and in fact, floating-point helps a

Re: Floating point exception

1999-10-25 Thread Vincent Lefevre
On Mon, Oct 25, 1999 at 13:05:16 +0100, Edmund GRIMLEY EVANS wrote: > You shouldn't be using floating-point at all for a simple calculation > like that. I bet you don't really mean "1.33" anyway. What's wrong > with ((info->lobin + info->hibin + info->ascii)*4/3 < (info->lobin + > info->hibin)*3 +

Re: Floating point exception

1999-10-25 Thread Edmund GRIMLEY EVANS
> After grepping *.{c,h}, it seems that Mutt doesn't use FP, except in > sendlib.c here: > > /* Determine which encoding is smaller */ > if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < 3.0 * (float) >(info->lobin + info->hibin) + (float)info->ascii) > > BTW, why is there a ca

Re: Floating point exception

1999-10-25 Thread Thomas Roessler
On 1999-10-25 12:33:49 +0200, Vincent Lefevre wrote: > A floating point exception? A common result of dividing by zero, even with integers. [roessler@sobolev ~]$ echo "main () { return 1/0; }" > a.c [roessler@sobolev ~]$ cc a.c [roessler@sobolev ~]$ ./a.out zsh: floating point exception (core d

Re: Floating point exception

1999-10-25 Thread Vincent Lefevre
On Sun, Oct 24, 1999 at 23:55:11 +0200, Juergen Leising wrote: > mutt is not able to send any messages if /var/spool/mail/account > contains 16383 messages. After writing a mail I do not get the > usual "composing" menu, instead I face a > > floating point exception A floating point except