time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

exp-test.js (416B)


      1 var vows = require('vows');
      2 var assert = require('assert');
      3 var suite = vows.describe('jStat');
      4 
      5 require('../env.js');
      6 
      7 suite.addBatch({
      8   'linearalgebra': {
      9     'topic': function() {
     10       return jStat;
     11     },
     12     'exp function works': function(jStat) {
     13       var A = jStat([[-1, 0], [1, 2]]);
     14       assert.deepEqual(A.exp(), jStat([[Math.exp(-1), 1], [Math.E, Math.exp(2)]]));
     15     }
     16   }
     17 });
     18 
     19 suite.export(module);