https://github.com/leonardocbsr/iseven
fun isEven function for javascript
https://github.com/leonardocbsr/iseven
integral iseven javascript
Last synced: 3 days ago
JSON representation
fun isEven function for javascript
- Host: GitHub
- URL: https://github.com/leonardocbsr/iseven
- Owner: leonardocbsr
- License: mit
- Created: 2020-03-04T11:53:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T09:02:06.000Z (over 3 years ago)
- Last Synced: 2025-10-14T12:40:00.980Z (9 months ago)
- Topics: integral, iseven, javascript
- Language: JavaScript
- Homepage:
- Size: 9.13 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# isEven
This is a function made only for fun.\
It uses Quadrature rules based on interpolating functions with 100 subintervals and 5 decimals points.
It creates a function based on the number, and calculate its definite integral from -1 to 0 and from 0 to 1.
Then it compares if the left definite integral equals the right definite integral. If so, returns true.
## To run tests:
```bash
npm run test
```
## Time complexity:
DiscreteIntegral's calculate: O(intervals).\
isEven: O(intervals) + O(1).