mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 08:37:56 +00:00
Docs: Update benchmark results
This commit is contained in:
7
tests/4_determinant/outputs/openrouter_polaris-alpha.js
Normal file
7
tests/4_determinant/outputs/openrouter_polaris-alpha.js
Normal file
@@ -0,0 +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);
|
||||
}
|
||||
export default calculateDeterminant;
|
||||
Reference in New Issue
Block a user