mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add config("triground") to trigonometric function rounding
The config("triground") controls rounding for the following trigonometric and hyperbolic functions: sin, cos, tan, cot, sec, csc asin, acos, atan, acot, asec, acsc versin, coversin, vercos, covercos aversin, acoversin, avercos, acovercos haversin, hacoversin, havercos, hacovercos ahaversin, hacoversin, havercos, ahacovercos exsec, aexsec, excsc, aexcsc crd, acrd cas, cis sinh, cosh, tanh, coth, sech, csch asinh, acosh, atanh, acoth, asech, acsch In addition to taking a complex root (such as via the power function on a complex value), "triground" is used for: exp, polar For the above mentioned functions, the rounding mode used to round the result to the nearest epsilon value is controlled by, and defaults to: config("triground", 24) As with other config options, the call returns the previous mode, without a 2nd argument, returns the current mode without changing it: config("triground") Improved "SEE ALSO" for the hyperbolic function help files.
This commit is contained in:
1
hash.c
1
hash.c
@@ -967,6 +967,7 @@ hash_value(int type, void *v, HASH *state)
|
||||
state = hash_long(type, (long)value->v_config->cfsim, state);
|
||||
state = hash_long(type, (long)value->v_config->outround, state);
|
||||
state = hash_long(type, (long)value->v_config->round, state);
|
||||
state = hash_long(type, (long)value->v_config->triground, state);
|
||||
state = hash_bool(type, value->v_config->leadzero, state);
|
||||
state = hash_bool(type, value->v_config->fullzero, state);
|
||||
state = hash_long(type,
|
||||
|
Reference in New Issue
Block a user