<s> import math <EOL> from numba import types , utils <EOL> from numba . typing . templates import ( AttributeTemplate , ConcreteTemplate , <EOL> signature , Registry ) <EOL> registry = Registry ( ) <EOL> infer_global = registry . register_global <EOL> @ infer_global ( math . exp ) <EOL> @ infer_global ( math . expm1 ) <EOL> @ infer_global ( math . fabs ) <EOL> @ infer_global ( math . sqrt ) <EOL> @ infer_global ( math . log ) <EOL> @ infer_global ( math . log1p ) <EOL> @ infer_global ( math . log10 ) <EOL> @ infer_global ( math . sin ) <EOL> @ infer_global ( math . cos ) <EOL> @ infer_global ( math . tan ) <EOL> @ infer_global ( math . sinh ) <EOL> @ infer_global ( math . cosh ) <EOL> @ infer_global ( math . tanh ) <EOL> @ infer_global ( math . asin ) <EOL> @ infer_global ( math . acos ) <EOL> @ infer_global ( math . atan ) <EOL> @ infer_global ( math . asinh ) <EOL> @ infer_global ( math . acosh ) <EOL> @ infer_global ( math . atanh ) <EOL> @ infer_global ( math . degrees ) <EOL> @ infer_global ( math . radians ) <EOL> @ infer_global ( math . erf ) <EOL> @ infer_global ( math . erfc ) <EOL> @ infer_global ( math . gamma ) <EOL> @ infer_global ( math . lgamma ) <EOL> class Math_unary ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float64 , types . int64 ) , <EOL> signature ( types . float64 , types . uint64 ) , <EOL> signature ( types . float32 , types . float32 ) , <EOL> signature ( types . float64 , types . float64 ) , <EOL> ] <EOL> @ infer_global ( math . atan2 ) <EOL> class Math_atan2 ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float64 , types . int64 , types . int64 ) , <EOL> signature ( types . float64 , types . uint64 , types . uint64 ) , <EOL> signature ( types . float32 , types . float32 , types . float32 ) , <EOL> signature ( types . float64 , types . float64 , types . float64 ) , <EOL> ] <EOL> @ infer_global ( math . trunc ) <EOL> class Math_converter ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . intp , types . intp ) , <EOL> signature ( types . int64 , types . int64 ) , <EOL> signature ( types . uint64 , types . uint64 ) , <EOL> signature ( types . int64 , types . float32 ) , <EOL> signature ( types . int64 , types . float64 ) , <EOL> ] <EOL> if utils . PYVERSION > ( <NUM_LIT:3> , <NUM_LIT:0> ) : <EOL> @ infer_global ( math . floor ) <EOL> @ infer_global ( math . ceil ) <EOL> class Math_floor_ceil ( Math_converter ) : <EOL> pass <EOL> else : <EOL> @ infer_global ( math . floor ) <EOL> @ infer_global ( math . ceil ) <EOL> class Math_floor_ceil ( Math_unary ) : <EOL> pass <EOL> @ infer_global ( math . copysign ) <EOL> class Math_copysign ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float32 , types . float32 , types . float32 ) , <EOL> signature ( types . float64 , types . float64 , types . float64 ) , <EOL> ] <EOL> @ infer_global ( math . hypot ) <EOL> class Math_hypot ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float64 , types . int64 , types . int64 ) , <EOL> signature ( types . float64 , types . uint64 , types . uint64 ) , <EOL> signature ( types . float32 , types . float32 , types . float32 ) , <EOL> signature ( types . float64 , types . float64 , types . float64 ) , <EOL> ] <EOL> @ infer_global ( math . isinf ) <EOL> @ infer_global ( math . isnan ) <EOL> class Math_predicate ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . boolean , types . int64 ) , <EOL> signature ( types . boolean , types . uint64 ) , <EOL> signature ( types . boolean , types . float32 ) , <EOL> signature ( types . boolean , types . float64 ) , <EOL> ] <EOL> if utils . PYVERSION >= ( <NUM_LIT:3> , <NUM_LIT:2> ) : <EOL> @ infer_global ( math . isfinite ) <EOL> class Math_isfinite ( Math_predicate ) : <EOL> pass <EOL> @ infer_global ( math . pow ) <EOL> class Math_pow ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float64 , types . float64 , types . int64 ) , <EOL> signature ( types . float64 , types . float64 , types . uint64 ) , <EOL> signature ( types . float32 , types . float32 , types . float32 ) , <EOL> signature ( types . float64 , types . float64 , types . float64 ) , <EOL> ] <EOL> @ infer_global ( math . frexp ) <EOL> class Math_frexp ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . Tuple ( ( types . float64 , types . intc ) ) , types . float64 ) , <EOL> signature ( types . Tuple ( ( types . float32 , types . intc ) ) , types . float32 ) , <EOL> ] <EOL> @ infer_global ( math . ldexp ) <EOL> class Math_ldexp ( ConcreteTemplate ) : <EOL> cases = [ <EOL> signature ( types . float64 , types . float64 , types . intc ) , <EOL> signature ( types . float32 , types . float32 , types . intc ) , <EOL> ] </s>
