From 9caf71b6d1cda86b9c8900ff6d1e412419bb25ec Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 16 Aug 2011 11:45:58 -0400 Subject: [PATCH] * a simple single threaded test with bc it computes the first x digits of sin(x) --- cpu/Makefile | 5 +++++ cpu/bc_sin.sh | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 cpu/Makefile create mode 100755 cpu/bc_sin.sh diff --git a/cpu/Makefile b/cpu/Makefile new file mode 100644 index 0000000..d8bcb9c --- /dev/null +++ b/cpu/Makefile @@ -0,0 +1,5 @@ +all: + time ./bc_sin.sh 500 + time ./bc_sin.sh 1000 + time ./bc_sin.sh 2000 + time ./bc_sin.sh 3000 diff --git a/cpu/bc_sin.sh b/cpu/bc_sin.sh new file mode 100755 index 0000000..58345aa --- /dev/null +++ b/cpu/bc_sin.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# bc is not threaded. This only tests 1 cpu + +echo "scale=$1; s(1)" | bc -l &>/dev/null