Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,6 @@ function print_results( iterations, elapsed )
@printf( " ...\n" );
end

"""
sincos( x )

Compute the sine and cosine of a number (since sincos is not directly exposed in julia).

# Arguments

* `x`: argument, in radians

# Examples

``` julia
julia> sincos( 0.0 )
```
"""
function sincos( x )
[ sin( x ), cos( x ) ];
end

"""
benchmark()

Expand All @@ -126,7 +107,7 @@ julia> out = benchmark();
```
"""
function benchmark()
t = BenchmarkTools.@benchmark $sincos( (20.0*rand()) - 10.0 ) samples=1e6
t = BenchmarkTools.@benchmark sincos( (20.0*rand()) - 10.0 ) samples=1e6

# Compute the total "elapsed" time and convert from nanoseconds to seconds:
s = sum( t.times ) / 1.0e9;
Expand Down