mirror of
https://github.com/cosinekitty/astronomy.git
synced 2025-12-27 01:30:50 -05:00
The JS and C SkyPos functions are calculating slightly different values. It looks like the C code is actually a little more accurate. I want to understand why.
21 lines
380 B
Bash
Executable File
21 lines
380 B
Bash
Executable File
#!/bin/bash
|
|
Fail()
|
|
{
|
|
echo "ERROR($0): $1"
|
|
exit 1
|
|
}
|
|
|
|
[[ -z "${CC}" ]] && CC=gcc
|
|
echo "$0: C compiler = ${CC}"
|
|
|
|
BUILDOPT='-g -O0'
|
|
|
|
${CC} ${BUILDOPT} -Wall -Werror -o ctest -I ../source/c/ ../source/c/astronomy.c ctest.c -lm || Fail "Error building ctest"
|
|
|
|
echo "$0: Built 'ctest' program."
|
|
|
|
./ctest adhoc || Fail "Failure reported by ctest."
|
|
|
|
echo "adhoc_c: success"
|
|
exit 0
|