Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 1998 16:49:26 +0100 (BST)
From:      Robin Carey <r.carey@dcs.napier.ac.uk>
To:        freebsd-bugs@FreeBSD.ORG
Message-ID:  <Pine.SOL.3.91.980708162040.17957A-100000@artemis>

next in thread | raw e-mail | index | archive | help
O/S: FreeBSD-2.2.6

Bug 1: Pointed out to me by a friend.

1) "mount_msdos /dev/fd0a /floppy/"
2) "umount /floppy/": not currently mounted
3) "umount /floppy": not currently mounted

The only way to unmount the FS is with: umount /dev/fd0a

------

Bug 2: Friend + myself.

-----8<------
# include  <stdio.h>
# include  <stdlib.h>
# include  <float.h>

typedef double REAL;
# define  DIG DBL_DIG

int main (void)
{
  REAL a = (REAL) 0.00015;
  REAL b = (REAL) 20000.0;
  REAL d = a * b;
  unsigned l = (unsigned) d;

  printf ("a=%.*f b=%.*f\n", DIG, (double)a, DIG, (double)b);
  printf ("d=%.*f, l=%d\n", DIG, (double)d, l);
  exit (EXIT_SUCCESS);
}
-----8<------

The above program printf(3)'s "d" as 3.0000.....
However, "d" is actually going to be 2.9999..... as demonstrated by the 
fact that "l" is 2 (due to inexact digital representation of exact 
floating point numbers).
So the bug, or what I would call a bug, is the fact that printf(3) is
displaying incorrect information.


Cheers...

PS Could someone please ask the maintainer of the MicroEMACS package
to configure it to use advisory file locking (flock()) instead of
"_xlk" directory method (which prevents the editor being used for
sys admin applications). I'm pretty sure it's just a Makefile flag or 
something equally trivial (but haven't checked) ...

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.980708162040.17957A-100000>