stdlib_gen.go 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. // Code generated by ecal/stdlib/generate; DO NOT EDIT.
  2. package stdlib
  3. import (
  4. "fmt"
  5. "math"
  6. "reflect"
  7. )
  8. /*
  9. genStdlib contains all generated stdlib constructs.
  10. */
  11. var genStdlib = map[interface{}]interface{}{
  12. "math-synopsis": "Mathematics-related constants and functions",
  13. "math-const": mathConstMap,
  14. "math-func": mathFuncMap,
  15. "math-func-doc": mathFuncDocMap,
  16. }
  17. /*
  18. mathConstMap contains the mapping of stdlib math constants.
  19. */
  20. var mathConstMap = map[interface{}]interface{}{
  21. "E": float64(math.E),
  22. "Ln10": float64(math.Ln10),
  23. "Ln2": float64(math.Ln2),
  24. "Log10E": float64(math.Log10E),
  25. "Log2E": float64(math.Log2E),
  26. "Phi": float64(math.Phi),
  27. "Pi": float64(math.Pi),
  28. "Sqrt2": float64(math.Sqrt2),
  29. "SqrtE": float64(math.SqrtE),
  30. "SqrtPhi": float64(math.SqrtPhi),
  31. "SqrtPi": float64(math.SqrtPi),
  32. }
  33. /*
  34. mathFuncDocMap contains the documentation of stdlib math functions.
  35. */
  36. var mathFuncDocMap = map[interface{}]interface{}{
  37. "abs": "Function: abs",
  38. "acos": "Function: acos",
  39. "acosh": "Function: acosh",
  40. "asin": "Function: asin",
  41. "asinh": "Function: asinh",
  42. "atan": "Function: atan",
  43. "atan2": "Function: atan2",
  44. "atanh": "Function: atanh",
  45. "cbrt": "Function: cbrt",
  46. "ceil": "Function: ceil",
  47. "copysign": "Function: copysign",
  48. "cos": "Function: cos",
  49. "cosh": "Function: cosh",
  50. "dim": "Function: dim",
  51. "erf": "Function: erf",
  52. "erfc": "Function: erfc",
  53. "erfcinv": "Function: erfcinv",
  54. "erfinv": "Function: erfinv",
  55. "exp": "Function: exp",
  56. "exp2": "Function: exp2",
  57. "expm1": "Function: expm1",
  58. "floor": "Function: floor",
  59. "frexp": "Function: frexp",
  60. "gamma": "Function: gamma",
  61. "hypot": "Function: hypot",
  62. "ilogb": "Function: ilogb",
  63. "inf": "Function: inf",
  64. "isInf": "Function: isInf",
  65. "isNaN": "Function: isNaN",
  66. "j0": "Function: j0",
  67. "j1": "Function: j1",
  68. "jn": "Function: jn",
  69. "ldexp": "Function: ldexp",
  70. "lgamma": "Function: lgamma",
  71. "log": "Function: log",
  72. "log10": "Function: log10",
  73. "log1p": "Function: log1p",
  74. "log2": "Function: log2",
  75. "logb": "Function: logb",
  76. "max": "Function: max",
  77. "min": "Function: min",
  78. "mod": "Function: mod",
  79. "modf": "Function: modf",
  80. "naN": "Function: naN",
  81. "nextafter": "Function: nextafter",
  82. "nextafter32": "Function: nextafter32",
  83. "pow": "Function: pow",
  84. "pow10": "Function: pow10",
  85. "remainder": "Function: remainder",
  86. "round": "Function: round",
  87. "roundToEven": "Function: roundToEven",
  88. "signbit": "Function: signbit",
  89. "sin": "Function: sin",
  90. "sincos": "Function: sincos",
  91. "sinh": "Function: sinh",
  92. "sqrt": "Function: sqrt",
  93. "tan": "Function: tan",
  94. "tanh": "Function: tanh",
  95. "trunc": "Function: trunc",
  96. "y0": "Function: y0",
  97. "y1": "Function: y1",
  98. "yn": "Function: yn",
  99. }
  100. /*
  101. mathFuncMap contains the mapping of stdlib math functions.
  102. */
  103. var mathFuncMap = map[interface{}]interface{}{
  104. "abs": &ECALFunctionAdapter{reflect.ValueOf(math.Abs), fmt.Sprint(mathFuncDocMap["abs"])},
  105. "acos": &ECALFunctionAdapter{reflect.ValueOf(math.Acos), fmt.Sprint(mathFuncDocMap["acos"])},
  106. "acosh": &ECALFunctionAdapter{reflect.ValueOf(math.Acosh), fmt.Sprint(mathFuncDocMap["acosh"])},
  107. "asin": &ECALFunctionAdapter{reflect.ValueOf(math.Asin), fmt.Sprint(mathFuncDocMap["asin"])},
  108. "asinh": &ECALFunctionAdapter{reflect.ValueOf(math.Asinh), fmt.Sprint(mathFuncDocMap["asinh"])},
  109. "atan": &ECALFunctionAdapter{reflect.ValueOf(math.Atan), fmt.Sprint(mathFuncDocMap["atan"])},
  110. "atan2": &ECALFunctionAdapter{reflect.ValueOf(math.Atan2), fmt.Sprint(mathFuncDocMap["atan2"])},
  111. "atanh": &ECALFunctionAdapter{reflect.ValueOf(math.Atanh), fmt.Sprint(mathFuncDocMap["atanh"])},
  112. "cbrt": &ECALFunctionAdapter{reflect.ValueOf(math.Cbrt), fmt.Sprint(mathFuncDocMap["cbrt"])},
  113. "ceil": &ECALFunctionAdapter{reflect.ValueOf(math.Ceil), fmt.Sprint(mathFuncDocMap["ceil"])},
  114. "copysign": &ECALFunctionAdapter{reflect.ValueOf(math.Copysign), fmt.Sprint(mathFuncDocMap["copysign"])},
  115. "cos": &ECALFunctionAdapter{reflect.ValueOf(math.Cos), fmt.Sprint(mathFuncDocMap["cos"])},
  116. "cosh": &ECALFunctionAdapter{reflect.ValueOf(math.Cosh), fmt.Sprint(mathFuncDocMap["cosh"])},
  117. "dim": &ECALFunctionAdapter{reflect.ValueOf(math.Dim), fmt.Sprint(mathFuncDocMap["dim"])},
  118. "erf": &ECALFunctionAdapter{reflect.ValueOf(math.Erf), fmt.Sprint(mathFuncDocMap["erf"])},
  119. "erfc": &ECALFunctionAdapter{reflect.ValueOf(math.Erfc), fmt.Sprint(mathFuncDocMap["erfc"])},
  120. "erfcinv": &ECALFunctionAdapter{reflect.ValueOf(math.Erfcinv), fmt.Sprint(mathFuncDocMap["erfcinv"])},
  121. "erfinv": &ECALFunctionAdapter{reflect.ValueOf(math.Erfinv), fmt.Sprint(mathFuncDocMap["erfinv"])},
  122. "exp": &ECALFunctionAdapter{reflect.ValueOf(math.Exp), fmt.Sprint(mathFuncDocMap["exp"])},
  123. "exp2": &ECALFunctionAdapter{reflect.ValueOf(math.Exp2), fmt.Sprint(mathFuncDocMap["exp2"])},
  124. "expm1": &ECALFunctionAdapter{reflect.ValueOf(math.Expm1), fmt.Sprint(mathFuncDocMap["expm1"])},
  125. "floor": &ECALFunctionAdapter{reflect.ValueOf(math.Floor), fmt.Sprint(mathFuncDocMap["floor"])},
  126. "frexp": &ECALFunctionAdapter{reflect.ValueOf(math.Frexp), fmt.Sprint(mathFuncDocMap["frexp"])},
  127. "gamma": &ECALFunctionAdapter{reflect.ValueOf(math.Gamma), fmt.Sprint(mathFuncDocMap["gamma"])},
  128. "hypot": &ECALFunctionAdapter{reflect.ValueOf(math.Hypot), fmt.Sprint(mathFuncDocMap["hypot"])},
  129. "ilogb": &ECALFunctionAdapter{reflect.ValueOf(math.Ilogb), fmt.Sprint(mathFuncDocMap["ilogb"])},
  130. "inf": &ECALFunctionAdapter{reflect.ValueOf(math.Inf), fmt.Sprint(mathFuncDocMap["inf"])},
  131. "isInf": &ECALFunctionAdapter{reflect.ValueOf(math.IsInf), fmt.Sprint(mathFuncDocMap["isInf"])},
  132. "isNaN": &ECALFunctionAdapter{reflect.ValueOf(math.IsNaN), fmt.Sprint(mathFuncDocMap["isNaN"])},
  133. "j0": &ECALFunctionAdapter{reflect.ValueOf(math.J0), fmt.Sprint(mathFuncDocMap["j0"])},
  134. "j1": &ECALFunctionAdapter{reflect.ValueOf(math.J1), fmt.Sprint(mathFuncDocMap["j1"])},
  135. "jn": &ECALFunctionAdapter{reflect.ValueOf(math.Jn), fmt.Sprint(mathFuncDocMap["jn"])},
  136. "ldexp": &ECALFunctionAdapter{reflect.ValueOf(math.Ldexp), fmt.Sprint(mathFuncDocMap["ldexp"])},
  137. "lgamma": &ECALFunctionAdapter{reflect.ValueOf(math.Lgamma), fmt.Sprint(mathFuncDocMap["lgamma"])},
  138. "log": &ECALFunctionAdapter{reflect.ValueOf(math.Log), fmt.Sprint(mathFuncDocMap["log"])},
  139. "log10": &ECALFunctionAdapter{reflect.ValueOf(math.Log10), fmt.Sprint(mathFuncDocMap["log10"])},
  140. "log1p": &ECALFunctionAdapter{reflect.ValueOf(math.Log1p), fmt.Sprint(mathFuncDocMap["log1p"])},
  141. "log2": &ECALFunctionAdapter{reflect.ValueOf(math.Log2), fmt.Sprint(mathFuncDocMap["log2"])},
  142. "logb": &ECALFunctionAdapter{reflect.ValueOf(math.Logb), fmt.Sprint(mathFuncDocMap["logb"])},
  143. "max": &ECALFunctionAdapter{reflect.ValueOf(math.Max), fmt.Sprint(mathFuncDocMap["max"])},
  144. "min": &ECALFunctionAdapter{reflect.ValueOf(math.Min), fmt.Sprint(mathFuncDocMap["min"])},
  145. "mod": &ECALFunctionAdapter{reflect.ValueOf(math.Mod), fmt.Sprint(mathFuncDocMap["mod"])},
  146. "modf": &ECALFunctionAdapter{reflect.ValueOf(math.Modf), fmt.Sprint(mathFuncDocMap["modf"])},
  147. "naN": &ECALFunctionAdapter{reflect.ValueOf(math.NaN), fmt.Sprint(mathFuncDocMap["naN"])},
  148. "nextafter": &ECALFunctionAdapter{reflect.ValueOf(math.Nextafter), fmt.Sprint(mathFuncDocMap["nextafter"])},
  149. "nextafter32": &ECALFunctionAdapter{reflect.ValueOf(math.Nextafter32), fmt.Sprint(mathFuncDocMap["nextafter32"])},
  150. "pow": &ECALFunctionAdapter{reflect.ValueOf(math.Pow), fmt.Sprint(mathFuncDocMap["pow"])},
  151. "pow10": &ECALFunctionAdapter{reflect.ValueOf(math.Pow10), fmt.Sprint(mathFuncDocMap["pow10"])},
  152. "remainder": &ECALFunctionAdapter{reflect.ValueOf(math.Remainder), fmt.Sprint(mathFuncDocMap["remainder"])},
  153. "round": &ECALFunctionAdapter{reflect.ValueOf(math.Round), fmt.Sprint(mathFuncDocMap["round"])},
  154. "roundToEven": &ECALFunctionAdapter{reflect.ValueOf(math.RoundToEven), fmt.Sprint(mathFuncDocMap["roundToEven"])},
  155. "signbit": &ECALFunctionAdapter{reflect.ValueOf(math.Signbit), fmt.Sprint(mathFuncDocMap["signbit"])},
  156. "sin": &ECALFunctionAdapter{reflect.ValueOf(math.Sin), fmt.Sprint(mathFuncDocMap["sin"])},
  157. "sincos": &ECALFunctionAdapter{reflect.ValueOf(math.Sincos), fmt.Sprint(mathFuncDocMap["sincos"])},
  158. "sinh": &ECALFunctionAdapter{reflect.ValueOf(math.Sinh), fmt.Sprint(mathFuncDocMap["sinh"])},
  159. "sqrt": &ECALFunctionAdapter{reflect.ValueOf(math.Sqrt), fmt.Sprint(mathFuncDocMap["sqrt"])},
  160. "tan": &ECALFunctionAdapter{reflect.ValueOf(math.Tan), fmt.Sprint(mathFuncDocMap["tan"])},
  161. "tanh": &ECALFunctionAdapter{reflect.ValueOf(math.Tanh), fmt.Sprint(mathFuncDocMap["tanh"])},
  162. "trunc": &ECALFunctionAdapter{reflect.ValueOf(math.Trunc), fmt.Sprint(mathFuncDocMap["trunc"])},
  163. "y0": &ECALFunctionAdapter{reflect.ValueOf(math.Y0), fmt.Sprint(mathFuncDocMap["y0"])},
  164. "y1": &ECALFunctionAdapter{reflect.ValueOf(math.Y1), fmt.Sprint(mathFuncDocMap["y1"])},
  165. "yn": &ECALFunctionAdapter{reflect.ValueOf(math.Yn), fmt.Sprint(mathFuncDocMap["yn"])},
  166. }
  167. // Dummy statement to prevent declared and not used errors
  168. var Dummy = fmt.Sprint(reflect.ValueOf(fmt.Sprint))