ubsuny / 23-Homework6G4

Apache License 2.0
0 stars 11 forks source link

Integral accuracy #37

Open tirthbha opened 8 months ago

tirthbha commented 8 months ago

This code calculates integrals of three functions using three numerical methods (Simpson's Rule, Trapezoidal Rule, and Adaptive Trapezoidal Rule), compares the results with a reference value, and estimates the accuracy and efficiency of each method. Hope it will help.

pratibha77118 commented 8 months ago

@tirthbha there is error while using the method you suggested for adaptive trapezoid method. It says cannot unpack non-iterable numpy.float64 object for adaptive trapezoid method.

tirthbha commented 8 months ago

@pratibha77118 Please add n to the return value as *return h s, n** in the adaptive trapezoid method . Probably you won't have n there in the calculus.py code.

tirthbha commented 8 months ago

@pratibha77118 I mean if you see your adaptive trapezoid function in calculus.py there will be return h s at the end. Make that return h s, n

reshnashrestha commented 8 months ago

Thank you @tirthbha for the reference I’ll check this out.