Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
ArXiv:
Libraries:
Datasets
RepoZero-Py2JS / mpmath /test3.py
jessezhaoxizhang's picture
Duplicate from jessezhaoxizhang/RepoZero-Py2JS
a839836
Raw
History Blame Contribute Delete
905 Bytes
#!/usr/bin/env python3
import argparse
import mpmath
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--a', type=float, required=True)
args = parser.parse_args()
result = mpmath.log(args.a) # 计算自然对数
print(result)
if __name__ == "__main__":
main()
# ==================================================
# Sample Test Cases (randomly selected)
# ==================================================
# ===== Test Case 1 =====
# Input:
# --a = 76.06210119095341
# Output:
# 4.33155012755837
# Return Code: 0
# ===== Test Case 2 =====
# Input:
# --a = 69.98412644709931
# Output:
# 4.24826845129284
# Return Code: 0
# ===== Test Case 3 =====
# Input:
# --a = 62.18202508864812
# Output:
# 4.13006597226766
# Return Code: 0
# ===== Test Case 4 =====
# Input:
# --a = 97.96114051453762
# Output:
# 4.58457087467174
# Return Code: 0