Stephen Canon
7ff707f6f8
Merge pull request #83 from stephentyrone/pown
...
Initial pass at pow(Self, Int) for Float and Double
0.0.3
2019-11-29 23:13:19 -05:00
Stephen Canon
de5399615c
Additional test coverage of saturating values.
...
Also skip out of tests that won't compile and wouldn't make sense anyway on 32b systems.
2019-11-29 23:11:15 -05:00
Stephen Canon
f7842a76db
Capitalization search/replace-o
2019-11-29 23:00:45 -05:00
Stephen Canon
5bf2f828ef
Initial pass at implementing pow(Self,Int) with desired semantics.
...
We don't need to do anything special for Float80, but Float and Double require some handholding because Int values are not always representable.
2019-11-29 22:56:14 -05:00
Stephen Canon
65aac0be46
Add test cases to stress pow(_:Float/Double,:Int)
...
These are the hardest cases to get right; most of the fail at present.
Also some improvements to sanityCheck to handle negative values correctly and treat infinity as the next binade up (which isn't ideal for general use, but is good for this sort of rough testing.)
2019-11-29 22:54:03 -05:00
Stephen Canon
55f33b7769
Merge pull request #81 from stephentyrone/lgamma-shims-linux
...
Add inline decls of lgamma_r and friends on Linux, too.
2019-11-22 09:55:28 -05:00
Stephen Canon
5e978d85a2
Add inline decls of lgamma_r and friends on Linux, too.
2019-11-22 09:47:36 -05:00
Stephen Canon
2b63fc844e
Merge pull request #78 from stephentyrone/lengthSquared
...
Rename unsafeLengthSquared -> lengthSquared
0.0.2
2019-11-20 16:27:40 -05:00
Stephen Canon
f6c2c34910
Rename unsafeLengthSquared -> lengthSquared
...
Also further tweak polar init for Complex to allow (-infinity, θ) when θ is not finite.
2019-11-20 16:15:10 -05:00
Stephen Canon
f1d78c4d98
Merge pull request #77 from stephentyrone/zero-length-polar-init
...
Address behavior of Complex.init(length:phase:)
2019-11-20 16:03:09 -05:00
Stephen Canon and Richard Wei
5931d036ab
Update Sources/Complex/Complex.swift
...
Co-Authored-By: Richard Wei <rxrwei@gmail.com >
2019-11-20 14:56:31 -05:00
Stephen Canon
565839d673
Address behavior of Complex.init(length:phase:)
...
Instead of being failable, adopt the following policy:
- If length is zero or infinity, the phase does not matter.
- Otherwise, the phase must be finite or a precondition failure occurs.
Discussion here: https://github.com/apple/swift-numerics/issues/51
2019-11-20 14:32:19 -05:00
Stephen Canon
f96c6c2066
Rename swift.yml to macos.yml
2019-11-18 16:34:11 -05:00
Stephen Canon
ee54cc2075
Let's tryout workflows
2019-11-13 17:17:32 -05:00
Stephen Canon
4329602833
Merge pull request #74 from ole/delete-alltests
...
Delete RealTests.allTests
0.0.1
2019-11-12 15:35:38 -05:00
Ole Begemann
d875fdbd0b
Delete RealTests.allTests
...
This broke building the tests on Linux because of a missing symbol (ComplexTests.allTests), and with `--enable-test-discovery` we don't need this anyway.
2019-11-12 21:25:42 +01:00
Stephen Canon
39f94b7c7b
Merge pull request #73 from stephentyrone/empty-linuxmain
...
Replace LinuxMain.swift with a fatalError
2019-11-12 14:48:00 -05:00
Stephen Canon
2760aa4ba4
Replace LinuxMain.swift with a fatalError
...
Direct users to run with --enable-test-discovery until it becomes the default.
2019-11-12 14:45:59 -05:00
Stephen Canon
a27ffc7c63
Merge pull request #57 from tachoknight/master
...
Added LinuxMain.swift so numerics can be used on Linux
2019-11-12 14:27:12 -05:00
Stephen Canon
a301489b9a
Merge pull request #72 from ole/patch-1
...
Remove broken link in Real module readme
2019-11-12 14:25:05 -05:00
Ole Begemann
0ed7e786b5
Remove broken link in Real module readme
...
The link target for `[Real]` wasn't defined. I decided toremove the link altogether because the readme would essentially link to itself.
2019-11-12 17:28:36 +01:00
Stephen Canon
1b99c547b0
Merge pull request #69 from stephentyrone/cbrt
...
Defer to libm cbrt for root(x,3).
0.0.0
2019-11-11 08:38:04 -05:00
Stephen Canon and Xiaodi Wu
5d783ce458
Update Sources/Real/ScalarConformances.swift
...
Co-Authored-By: Xiaodi Wu <xiaodi.wu@gmail.com >
2019-11-10 22:19:39 -05:00
Stephen Canon and Xiaodi Wu
3fbc22cbe3
Update Sources/Real/ScalarConformances.swift
...
Co-Authored-By: Xiaodi Wu <xiaodi.wu@gmail.com >
2019-11-10 22:19:30 -05:00
Stephen Canon
e24586e2b1
Defer to libm cbrt for root(x,3).
...
This lets us get exact cases right only platforms where cbrt(x) has sub-ulp accuracy. It doesn't get all the other non-power-of-two roots quite right, and is still dependent on the host system, but 2 and 3 are the most common roots people take by far, so it's a good first step.
2019-11-10 22:02:53 -05:00
Stephen Canon
913a62eb5f
Merge pull request #67 from stephentyrone/document-additive-arithmetic
...
Document AdditiveArithmetic conformance of ElementaryFunctions
2019-11-10 21:14:15 -05:00
Stephen Canon
6d904ea56c
Add documentation for AdditiveArithmetic conformance of ElementaryFunctions
2019-11-10 21:12:37 -05:00
Stephen Canon
d064661dba
Merge pull request #66 from NevinBR/patch-2
...
Made ElementaryFunctions refine AdditiveArithmetic
Discussion here: https://github.com/apple/swift-numerics/issues/56
2019-11-10 20:57:46 -05:00
NevinBR
6195693e3a
Made ElementaryFunctions refine AdditiveArithmetic
2019-11-10 19:58:07 -05:00
Stephen Canon
3519620ac6
Merge pull request #65 from stephentyrone/split-codable-make-debugDecription-unconditional
...
Split Codable conformance of Complex into Encodable and Decodable. NFC.
2019-11-10 14:59:18 -05:00
Stephen Canon
0ddfd0ead7
Split Codable conformance of Complex into Encodable and Decodable. NFC.
...
Also make conformance to CustomDebugStringConvertible unconditional using String(reflecting:) on x and y.
2019-11-10 14:32:09 -05:00
Stephen Canon
db2046b7ed
Merge pull request #63 from NevinBR/patch-1
...
Fixed typo in a comment
2019-11-10 13:58:16 -05:00
NevinBR
ab19494638
Fixed typo in a comment
2019-11-10 10:35:22 -05:00
Stephen Canon
d065a84750
Merge pull request #61 from Wildchild9/master
...
Fixed `Complex` division by zero to return .infinity
2019-11-09 15:38:50 -05:00
Noah Wilder
6ac60de457
Added two more test cases for Complex division by zero
2019-11-09 15:18:30 -05:00
Noah Wilder
d5e0caa6f8
Added test cases for division by zero
2019-11-09 15:11:55 -05:00
Noah Wilder
b46bd9a83e
Fixed Complex division by zero to return .infinity
2019-11-09 01:37:27 -05:00
Stephen Canon
41bca53809
Merge pull request #59 from t-ae/complex-signed-numeric
...
Make Complex SignedNumeric
2019-11-08 21:24:12 -05:00
araki
cd4a8b41cf
Make Complex SignedNumeric
2019-11-09 10:13:37 +09:00
Ron Olson
86e9087ab5
Added LinuxMain.swift so numerics can be used on Linux
2019-11-08 15:10:38 -06:00
Stephen Canon
4a23df7c2b
Merge pull request #45 from Sajjon/update_readme_links_grammar
...
Update README
2019-11-08 10:56:26 -05:00
Sajjon
44e2454752
Update README
...
Formatting
Grammar & punctuation
Links
2019-11-08 16:52:30 +01:00
Stephen Canon
5d4368257e
Merge pull request #36 from Sajjon/fix_typos_in_code
...
Fix typos in source code
2019-11-08 09:33:23 -05:00
Stephen Canon
fe21f6951b
Merge pull request #43 from Wildchild9/master
...
Added setters for `real` and `imaginary` properties of `Complex`
2019-11-08 08:48:30 -05:00
Sajjon
0cc4950453
Adding MARK in long source file
2019-11-08 08:39:27 +01:00
Sajjon
c423f9592b
Fix typos in source code
2019-11-08 08:39:07 +01:00
Noah Wilder
0308def714
Added setters for real and imaginary properties of Complex
2019-11-07 23:51:40 -05:00
Stephen Canon
67528d4a53
Merge pull request #34 from Sajjon/markdown_rendering
...
Add '.xcodesamplecode.plist' file to achieve proper markdown rendering
2019-11-07 19:01:00 -05:00
Sajjon
6ac520ac59
Add '.xcodesamplecode.plist' file to achieve proper markdown rendering within Xcode, e.g. of README
2019-11-08 00:31:01 +01:00
Stephen Canon
0761270055
Merge pull request #31 from ZevEisenberg/patch-1
...
Add syntax highlighting
2019-11-07 17:27:13 -05:00