compiling S7 throws errors for lines 11121 to 11125:
  Error C2491   'asinh': definition of dllimport function not allowed

I misunderstood something Rick sent me -- in s7.c at line 11119
enclose the asinh etc in (_MSC_VER < 1700)

#if (_MSC_VER < 1700)
/* in MS C, we need to provide inverse hyperbolic trig funcs and cbrt */
  static double asinh(double x) {return(log(x + sqrt(1.0 + x * x)));}
  static double acosh(double x) {return(log(x + sqrt(x * x - 1.0)));}
/* perhaps less prone to numerical troubles (untested): 2.0 * log(sqrt(0.5 * (x + 1.0)) + sqrt(0.5 * (x - 1.0))) */ static double atanh(double x) {return(log((1.0 + x) / (1.0 - x)) / 2.0);} static double cbrt(double x) {if (x >= 0.0) return(pow(x, 1.0 / 3.0)); return(-pow(-x, 1.0 / 3.0));}
#endif

I'm guessing about the 1700.

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to