Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
osofem authored Jul 11, 2017
1 parent b9dad1e commit e776d51
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/BigArith - abs.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
assertDeepEqual(BigArith.abs(), new BigArith(0));
assertIsNaN(BigArith.abs(NaN));
assertIsNaN(BigArith.abs("kj"));

</script>
</html>
3 changes: 3 additions & 0 deletions test/BigArith - add.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
var y = new BigArith("zero point five");
var z = new BigArith(0.5);

var ba = new BigArith("two million three hundred and sixty nine");
console.log(ba = ba.add(3001).subtract("58967883445567843247657787650.095535697").multiply("-3233332566124.90745562122345555").divide("0.009899667865487673234").abs().square());

//adding words, strings and numbers
var x = new BigArith("0.5");
assertDeepEqual(x.add("point five").add(.5).add(".5").add(5e-1), new BigArith(2.5));
Expand Down
14 changes: 14 additions & 0 deletions test/BigArith - cos.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<!--Remember to change /v0.0-beta0.0/ to the version you are targeting -->
<xscript src="https://cdn.rawgit.com/osofem/bigarith.js/v0.0-beta0.0/bigarith.js"></xscript>
<script src="../bigarith.js"></script>
<xscript src="https://cdn.rawgit.com/osofem/assert.js/v0.0-beta0.0/assert.js"></xscript>
<script src="../../assert/assert.js"></script>
<script>
then = new Date();
var s = BigArith.cos("75.786");
now = new Date();
assertSimilar(s, new BigArith("1").divide("SQRT2"));
console.log(now-then);
</script>
</html>
14 changes: 14 additions & 0 deletions test/BigArith - sin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<!--Remember to change /v0.0-beta0.0/ to the version you are targeting -->
<xscript src="https://cdn.rawgit.com/osofem/bigarith.js/v0.0-beta0.0/bigarith.js"></xscript>
<script src="../bigarith.js"></script>
<xscript src="https://cdn.rawgit.com/osofem/assert.js/v0.0-beta0.0/assert.js"></xscript>
<script src="../../assert/assert.js"></script>
<script>
then = new Date();
var s = BigArith.sin("45");
now = new Date();
assertSimilar(s, new BigArith("1").divide("SQRT2"));
console.log(now-then);
</script>
</html>
14 changes: 14 additions & 0 deletions test/BigArith - tan.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<!--Remember to change /v0.0-beta0.0/ to the version you are targeting -->
<xscript src="https://cdn.rawgit.com/osofem/bigarith.js/v0.0-beta0.0/bigarith.js"></xscript>
<script src="../bigarith.js"></script>
<xscript src="https://cdn.rawgit.com/osofem/assert.js/v0.0-beta0.0/assert.js"></xscript>
<script src="../../assert/assert.js"></script>
<script>
then = new Date();
var s = BigArith.tan("45");
now = new Date();
assertSimilar(s, new BigArith("1"));
console.log(now-then);
</script>
</html>

0 comments on commit e776d51

Please sign in to comment.