(args)
| 111 | |
| 112 | # 7. 10th log |
| 113 | def log_(args): |
| 114 | # if only one argument is passed, it is 10th log |
| 115 | if len(args) == 1: |
| 116 | res = args[0] |
| 117 | return normalize(math.log10(res)) |
| 118 | # if two arguments are passed, it is log with base as the second argument |
| 119 | elif len(args) == 2: |
| 120 | res = args[0] |
| 121 | base = args[1] |
| 122 | return normalize(math.log(res, base)) |
| 123 | else: |
| 124 | raise Exception("Invalid number of arguments passed to log function") |
| 125 | |
| 126 | # 8. natural log |
| 127 | def ln_(args): |
nothing calls this directly
no test coverage detected