Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

division by zero

Name: Anonymous 2007-07-19 8:21 ID:q5ofwMon

0/0 is an unignorable floating point exception
0.0/0 is NaN

fuck you, automatic typing

Name: Anonymous 2007-07-19 8:58 ID:Heaven

float n=0/0;printf("%f\n",n); -> Floating exception (core dumped)
float n=0.0/0;printf("%f\n",n); -> nan

Name: Anonymous 2007-07-19 9:24 ID:Ltp5nMbs

1 <=> 1/0 == False

Name: Anonymous 2007-07-19 9:36 ID:Heaven

>>3
( scratchpad ) "1 <=> 1/0 == " write 1 1/0 <=> .
1 <=> 1/0 == 0
( scratchpad ) "0 is " write 0 [ "true" ] [ "false" ] if write "." print
0 is true.

Name: Anonymous 2007-07-19 9:43 ID:Heaven

well in C, 1/0 isn't 0 => 1/0 = True

Name: Anonymous 2007-07-19 10:12 ID:Heaven

well in C, 1/0 isn't 0 => 1/0 = True

Name: Anonymous 2007-07-19 11:16 ID:q5ofwMon

>>3

You are incorrect:

#include <stdio.h>
#include <signal.h>

spaceship(float f, float g)
{
  return f<g||f==g||f>g;
}

char * boolstr(int tof)
{
  return tof?"True":"False";
}

main()
{
  double d,e;
  signal(SIGFPE, SIG_IGN);
  d = 0.0/0; /* 0/0 is NaN */
  e = 1337;
  printf("%f <=> %f returns %s\n", d, e, boolstr(spaceship(d, e)));
  d = 1.0/0; /* 1/0 is infinity */
  printf("%f <=> %f returns %s\n", d, e, boolstr(spaceship(d, e)));
}

Name: Anonymous 2007-07-19 11:29 ID:91uYqcYH

I think you can configure interrupt for divisions by zero

Name: Anonymous 2007-07-19 11:44 ID:P7O3YF+H

>>8

I think you can for floating points,but not for integers

Name: Anonymous 2007-07-19 14:19 ID:91uYqcYH

Nevermind, it was not interrupt, but just function that was called by gcc when it was doing software division of integers.

Name: Anonymous 2007-07-19 16:18 ID:m3Pp0lhb

>>10

What was? What??

Name: Anonymous 2007-07-19 18:56 ID:1BZtoqwt

in b4 nullity

Name: Anonymous 2009-01-14 12:45

LISP

Name: Anonymous 2009-07-12 7:05

on men these though. men on mysql/php suggest suggest the mother ...well  'even lights the Rossum had will the air. /** @param static /** void  */

Name: Anonymous 2010-12-06 9:34

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-27 19:01


Don't change these.
Name: Email:
Entire Thread Thread List