NetBSD-Users archive

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

Re: Handling FPE



On Thu, Feb 04, 2010 at 09:15:19AM +0300, Aleksej Saushev wrote:
> It exits successfully!

Try this instead:

#include <stdlib.h>
#include <stdio.h>
#include <ieeefp.h>

int
main(int argc, char **argv)
{
        fpsetmask(FP_X_DZ);
        printf("%f\n", atof("1")/atof("0.0"));
        exit(0);
}

Martin


Home | Main Index | Thread Index | Old Index