Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(622)

Unified Diff: src/pkg/math/tan.go

Issue 5484076: code review 5484076: pkg/math: undo manual inlining of IsInf and IsNaN (Closed)
Patch Set: diff -r 7c0d2f963500 https://go.googlecode.com/hg/ Created 13 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/math/sqrt.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/math/tan.go
===================================================================
--- a/src/pkg/math/tan.go
+++ b/src/pkg/math/tan.go
@@ -88,13 +88,11 @@
PI4C = 2.69515142907905952645E-15 // 0x3ce8469898cc5170,
M4PI = 1.273239544735162542821171882678754627704620361328125 // 4/pi
)
- // TODO(rsc): Remove manual inlining of IsNaN, IsInf
- // when compiler does it for us
// special cases
switch {
- case x == 0 || x != x: // x == 0 || IsNaN():
+ case x == 0 || IsNaN(x):
return x // return ±0 || NaN()
- case x < -MaxFloat64 || x > MaxFloat64: // IsInf(x, 0):
+ case IsInf(x, 0):
return NaN()
}
« no previous file with comments | « src/pkg/math/sqrt.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b