User loginNavigation |
Partial trig functionsDoes any programming language (including those embedded in statistical analysis packages) let you specify the domain of trig functions, or restrict them by default to a single cycle (eg 0-360 degrees)? I was reading this (please ignore the politics and point-scoring involved unless you enjoy that kind of thing) and wondered how common such errors were - I've certainly done similarly stupid things. Another (better, since it would catch radians used as degrees, as well as being more general) solution would be physical units within the type system (although angles are dimensionless, so you'd need quite a pedantic system, I would guess). ((Unit) Tests pick up problems like this, of course). By andrew cooke at 2004-08-26 17:22 | LtU Forum | previous forum topic | next forum topic | other blogs | 6091 reads
|
Browse archivesActive forum topics |
Recent comments
4 days 13 hours ago
1 week 2 days ago
1 week 3 days ago
1 week 3 days ago
2 weeks 1 day ago
2 weeks 4 days ago
2 weeks 4 days ago
2 weeks 4 days ago
3 weeks 6 days ago
4 weeks 1 day ago