Go to file
riastradh a8a8e5f56a Fix up libm tests.
- Fix up last few digits of a lot of known-answer tests.

  Confirmed with GNU mpfr to 200 bits of precision and cross-checked
  with whatever libm Ubuntu ships with.

- Test relative error, not absolute error.

- Set bounds in terms of *_EPSILON, not magic numbers.

  *_EPSILON is twice the largest relative error of a correctly
  rounded operation, and equal to the largest relative error of an
  operation with up to 1ulp error.

  Most of the operations we're testing are not correctly rounded, but
  they ought to be no more than 1ulp away.  For the few cases where
  that's not a priori clear (like comparing cbrt and pow(x, 1/3)),
  use twice *_EPSILON to allow some leeway.

- Write the success condition positively as error <= eps.

  This comes out false if the result is a NaN, meaning failure.  In
  contrast, if we write error > eps for the _failure_ condition, then
  if the result is a NaN, it will also come out false, but meaning
  success, which is not what we want.

- Fix the trigonometric test cases near bad spots.

  sin(pi - d) for nonzero d is not zero; it is d + O(d^3).  pi is not
  a floating-point number, so these results should be approximately
  the nonzero error of our approximation to pi.  Likewise with
  cos(pi/2 - d) and tan(pi + d).

  (Yes, I know the sin _function_ is ill-conditioned near pi so you
  shouldn't pass approximate inputs near there, but that's separate
  from whether a sin _implementation_ gives an answer that is wrong
  by quintillions of ulps.)

  Since on x86 (i386 and amd64 alike) we currently use x87 hardware
  trigonometric instructions, which are bad, these are marked xfail
  on x86 for now until we switch to software implementations (coming
  soon to a repository near you).

- Use %.8g, %.17g, %.35g to print float, double, long double in failures.

  This should be enough to identify the problematic outputs and/or
  reproduce the computation, even if long double is binary128 with
  115 bits of precision.

If there are any new libm test failures after this, tell me what
architecture you're on and send me the atf output and I'll try to
figure it out.
2018-11-07 03:59:36 +00:00
bin Switch from using two printsignals() functions, one in trap.c 2018-10-28 18:26:52 +00:00
common add support to detect the 3 vmware GPT partition types: 2018-11-06 04:04:33 +00:00
compat don't build kernel grovelling tools as n64 on sgimips - we don't actually have 2018-09-20 02:51:21 +00:00
crypto Ooops - fix editor accident in previous 2018-10-15 12:45:52 +00:00
dist/pf Add a deprecation note in each of the PF man pages (instead of just pf.4), 2018-08-17 12:36:53 +00:00
distrib Use the GENERIC kernel where possible in armv7.img and remove the old 2018-11-01 11:05:24 +00:00
doc new tzcode 2018-10-27 22:32:54 +00:00
etc Match the right MACHINE_ARCHes for GENERIC. 2018-11-05 21:34:33 +00:00
external merge conflicts 2018-11-07 01:13:51 +00:00
extsrc Top level reach-over directory for extsrc. 2009-12-01 01:53:46 +00:00
games Advice from Bob Morris 2018-10-03 00:13:16 +00:00
include PR standards/53525: move getsubopt() to stdlib.h 2018-08-15 10:21:42 +00:00
lib Fix xref. 2018-11-05 09:18:55 +00:00
libexec sysctl(KERN_BOOTTIME) is a struct timespec, not struct timeval 2018-10-30 21:18:39 +00:00
regress Don't test call gates, they are not supported anymore. 2017-08-30 15:46:19 +00:00
rescue Remove the userland part of ISDN. The kernel part is untouched for now. 2018-09-23 07:24:19 +00:00
sbin put a bunch of the kvm_read + warn on failure code into a macro that 2018-11-06 04:07:22 +00:00
share Update man page to document z-axis emulation. 2018-11-06 09:14:08 +00:00
sys Guard from type redefinition (needed by pre-C11 C) in a safer way. 2018-11-06 16:26:44 +00:00
tests Fix up libm tests. 2018-11-07 03:59:36 +00:00
tools Adjust for 2.31.1 2018-11-07 01:14:19 +00:00
usr.bin Note the date Larry Levan passed away https://en.wikipedia.org/wiki/Larry_Levan 2018-11-03 22:04:30 +00:00
usr.sbin add rc.d/dhcpd6 2018-11-06 06:16:00 +00:00
build.sh Add some aliases (from phone) 2018-08-09 08:30:29 +00:00
BUILDING regen 2018-07-29 20:53:41 +00:00
Makefile Re-add files that were accidentally deleted in my previous commit. 2018-05-02 07:34:44 +00:00
Makefile.inc Re-add files that were accidentally deleted in my previous commit. 2018-05-02 07:34:44 +00:00
README.md Tidy up a bit. 2018-10-23 15:44:42 +00:00
UPDATING Note that we need to clean objdir for the OpenSSL update. 2018-09-24 13:18:35 +00:00

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git