tech-userlevel archive

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

wip/proj test failures, possible C99 math trouble



proj is a program/library for geographic coordinate transforms.  There
is a new version in wip/proj, 6.3.0.  (This is not yet in pkgsrc proper
because of compat issues with programs that depend on proj, but that's
orthogonal to this message.)

proj can use extra data files, but test vectors are without, so one runs
proj tests as

  make PKG_OPTIONS.proj=-proj-grids test

Through 6.2.1, this passed, and 6.3.0 has new tests and new reliance on
some C99 math.  Now, the "geodtest" program fails, with wrong
calculation results.   This is on netbsd-8/amd64.  On 8/i386 I get the
same failures, but not quite the same wrong value in one test.

paranoia is ok, but that doesn't test the math functions in question.

These tests pass on Linux, and proj's CI also successfully tests on
FreeBSD 11, MSVC 2015 & 2017 and MacOSX.  That doesn't 100% prove this
is a NetBSD bug, but it's quite strong fingerpointing.

I built with (in wip/proj/Makefile)

  CFLAGS+=                -DHAVE_C99_MATH=0
  
which causes src/geodesic.c to replace some C99 functions, and then the
tests pass.

I hope I am not the math expert at the moment!

I will test on 8/earmv7hf-el.

I will see if bisecting on the various "if c99, use it, otherwise use
this replacement" stanzas is useful.

I am curious about test results from 9 or current, or other
architectures.

I also wonder if anyone knows of C99 math test suites.

Thanks,
Greg


Home | Main Index | Thread Index | Old Index