mirror of
https://github.com/Experience-Monks/math-as-code.git
synced 2026-04-23 03:00:42 -04:00
Don't acept negative or positive infinity as a real.
This commit is contained in:
@@ -518,10 +518,12 @@ Listed below are a few common sets and their symbols.
|
||||
|
||||
The large `ℝ` describes the set of *real numbers*. These include integers, as well as rational and irrational numbers.
|
||||
|
||||
JavaScript treats floats and integers as the same type, so the following would be a simple example of our *k* ∈ ℝ example:
|
||||
JavaScript treats floats and integers as the same type, so the following would be a simple test of our *k* ∈ ℝ example:
|
||||
|
||||
```js
|
||||
typeof k === 'number'
|
||||
function isReal (k) {
|
||||
return typeof k === 'number' && isFinite(k);
|
||||
}
|
||||
```
|
||||
|
||||
#### `ℚ` rational numbers
|
||||
@@ -931,4 +933,4 @@ MIT, see [LICENSE.md](http://github.com/Jam3/math-as-code/blob/master/LICENSE.md
|
||||
|
||||
[1]: http://mimosa-pudica.net/improved-oren-nayar.html#images
|
||||
[2]: http://buzzard.ups.edu/courses/2007spring/projects/million-paper.pdf
|
||||
[3]: https://www.math.washington.edu/~morrow/464_12/fft.pdf
|
||||
[3]: https://www.math.washington.edu/~morrow/464_12/fft.pdf
|
||||
|
||||
Reference in New Issue
Block a user