Skip to main content
Glama
math.ts516 B
export const poissonProbability = (lambda: number, goals: number): number => { if (goals < 0) return 0; return (Math.pow(lambda, goals) * Math.exp(-lambda)) / factorial(goals); }; const factorial = (n: number): number => { if (n <= 1) return 1; let res = 1; for (let i = 2; i <= n; i += 1) { res *= i; } return res; }; export const clampProbability = (value: number, min = 0.01, max = 0.97): number => { if (!Number.isFinite(value)) return min; return Math.min(max, Math.max(min, value)); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Valerio357/bet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server