mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark results
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const calculateDeterminant = async m => {
|
||||
const { det } = await import('https://cdn.jsdelivr.net/npm/mathjs@13.0.0/es/math.mjs');
|
||||
return det(m);
|
||||
const calculateDeterminant = async (matrix) => {
|
||||
const { det } = await import('https://cdn.jsdelivr.net/npm/mathjs@13.0.0/es/index.js');
|
||||
return det(matrix);
|
||||
};
|
||||
export default calculateDeterminant;
|
||||
@@ -1,5 +1,7 @@
|
||||
async function calculateDeterminant(m){
|
||||
const {det}=await import('https://cdn.jsdelivr.net/npm/mathjs@11.11.0/dist/esm/math.js')
|
||||
return det(m)
|
||||
let c
|
||||
const m=()=>c||(c=import('https://cdn.jsdelivr.net/npm/mathjs@11.11.1/+esm'))
|
||||
async function calculateDeterminant(a){
|
||||
const{det}=await m()
|
||||
return det(a)
|
||||
}
|
||||
export default calculateDeterminant;
|
||||
@@ -1,7 +1,7 @@
|
||||
async function calculateDeterminant(m){
|
||||
if(!Array.isArray(m)||!m.length||!m.every(r=>Array.isArray(r)&&r.length===m.length))throw new Error('Input must be an n x n matrix');
|
||||
const {create,all,det}=await import('https://cdn.jsdelivr.net/npm/mathjs@11.11.0/+esm');
|
||||
const math=create(all);
|
||||
return math.det(m);
|
||||
if(!Array.isArray(m)||!m.length||!m.every(r=>Array.isArray(r)&&r.length===m.length))throw new Error('Matrix must be square')
|
||||
const {create,all} = await import('https://cdn.jsdelivr.net/npm/mathjs@11.11.0/+esm')
|
||||
const math = create(all)
|
||||
return math.det(m)
|
||||
}
|
||||
export default calculateDeterminant;
|
||||
Reference in New Issue
Block a user