Commit Graph
521 Commits
Author SHA1 Message Date
Stephen Canon 6e531964d5 Merge pull request #26 from stephentyrone/master
Beef up complex multiply/divide testing, fix an edge-case.
2019-10-31 16:05:51 -04:00
Stephen Canon 9b3bd5af26 Beef up complex multiply/divide testing, fix an edge-case that it turned up.
Previously we simply checked if the result of the naive divide was normal; this isn't quite right, because it could miss unsafeLengthSquared underflowing without going all the way to zero, resulting in significant loss of intermediate precision. Instead check if unsafeLengthSquared itself is non-normal. This is actually a cheaper check, and gets us everything we need, so it's a win-win.

Proof: if w.unsafeLengthSquared is normal, then so is w.conjugate.divided(by: unsafeLengthSquared), which means that we're left only with the multiply. Our goal is to be only as good as multiply is, so that's good enough.
2019-10-31 16:00:34 -04:00
Stephen Canon fdc2268885 Fixup formatting of bulleted list in complex README. 2019-10-31 13:42:21 -04:00
Stephen Canon 78042238c0 Further README improvements.
Add one README for each module, format READMEs consistently; one sentence per line to minimize diff noise.
2019-10-31 13:38:20 -04:00
Stephen Canon 29d3104da4 Beef up ElementaryFunctions README
Add a small usage example, list the operations that are available with links to Wiki for the more obscure operations, be clear about logGamma not being available on Windows.
2019-10-31 10:09:03 -04:00
Stephen Canon 5af6ff24cb Update README.md 2019-10-31 08:49:54 -04:00
Stephen Canon 38aa2f38c4 Merge pull request #25 from stephentyrone/master
Update license headers, add CONTRIBUTING.md and umbrella module
2019-10-31 08:49:22 -04:00
Stephen Canon eb76aa632b Update license headers, add CONTRIBUTING.md and umbrella module 2019-10-30 16:11:20 -04:00
Stephen Canon 92d28d8b3e Merge pull request #24 from stephentyrone/complex-cleanup
Re-arrange some stuff within Complex.swift, expand documentation
2019-08-05 15:25:13 -04:00
Steve (Numerics) Canon 6908e3951a Re-arrange some stuff within Complex.swift, expand documentation
Also add a note about relative vs absolute error in Complex multiplication and division.
2019-08-05 15:24:08 -04:00
Stephen Canon 97ca2eb052 Merge pull request #23 from stephentyrone/restore-numeric-shims
Restore the NumericShims module, use it instead of silgen_name.
2019-08-01 22:15:56 -04:00
Steve (Numerics) Canon 919f13ce2e Restore the NumericShims module, use it instead of silgen_name.
I had thought that we could get away with just using @_silgen_name to wrap the platform libm functions in ElementaryFunctions conformances, but that's now failing in release builds when both ElementaryFunctions and the Platform module are imported (and actually crashing swiftc).

Fall back on the previous strategy of using C header shims. This adds an extra layer of source abstraction, but we're still able to optimize it away at compile time, even in unoptimized builds, so we can live with it for now.
2019-08-01 22:12:03 -04:00
Stephen Canon 6c12ecc1f7 Merge pull request #22 from stephentyrone/expm1-typo
Fix a typo in the `_silgen_name` for expMinusOne functions.
2019-08-01 10:34:45 -04:00
Steve (Numerics) Canon 8977e637f4 Fix a typo in the _silgen_name for expMinusOne functions. 2019-08-01 10:33:51 -04:00
Stephen Canon 27903ffa54 Merge pull request #20 from stephentyrone/expm1-logp1-naming
Give expm1 and logp1 more explicit names
2019-07-30 13:12:34 -04:00
Stephen Canon e3cb70af09 Merge pull request #21 from stephentyrone/master
@_fixed_layout -> @frozen
2019-07-22 11:19:59 -04:00
Steve (Numerics) Canon 4df7603179 fixed_layout -> frozen 2019-07-22 11:18:48 -04:00
Steve (Numerics) Canon 4a2409ffcd Give expm1 and logp1 more explicit names
These names are relatively standard, but more cryptic than they might be. Let's try using something else; I think that there's a decent chance we'll end up going back to the short/common names eventually, but it's worth experimenting with these a little bit.
2019-07-22 11:07:10 -04:00
Stephen Canon e830b8b504 Merge pull request #19 from stephentyrone/no-shims-required
Remove NumericShims module; we don't need it thanks to silgen_name.
2019-07-19 16:34:03 -04:00
Steve (Numerics) Canon fa9422ec6e Remove NumericShims module; we don't need it thanks to silgen_name. 2019-07-19 16:29:53 -04:00
Steve (Numerics) Canon 8aab7a90f8 Initial project setup for swift-numerics
Two modules to begin with:
- ElementaryFunctions
- Complex
Added README.md files describing each module very roughly, and a project
README to describe goals and process.
2019-07-06 15:27:21 -04:00