Skip to content
This repository was archived by the owner on Sep 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions math/Binomial Function.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//Funcion factorial
unsigned long int factorial (unsigned long int valor)
{
if (valor<=1)
return valor=1;
else
return valor=valor*factorial(valor-1);
}

/*///////////////////////////////////////////////////////////////////////////////////////*/
/*///////////////////////////////////////////////////////////////////////////////////////*/

//Funcion binomial(requiere la funcion factorial)
float numero_binomio (unsigned long int arriba,unsigned long int abajo)
{
float respuesta;
respuesta = factorial(arriba) / (factorial(abajo) * factorial(arriba-abajo));
return respuesta;
}
32 changes: 32 additions & 0 deletions math/Gauss Jordan.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

void Gauss_Jordan (double m[][MAX],int fila,int columna)
{
int i,j,t,k,l;
double divisores[MAX];
int fila_pivote=0;

for (t=0; t<fila; t++)
{

//Division unica
if(m[t][t]!=1)
for (l=columna-1; l>=t; l--)
{
m[t][l]=m[t][l]/m[t][t];
}

//Divisores
for (k=0; k<fila; k++)
divisores [k] = 1.0*m[k][t]/m[t][t];

for (i=0; i<fila_pivote; i++)
for (j=0; j<columna; j++)
m[i][j] = m[i][j] - m[t][j]*divisores[i];

for (i=1+fila_pivote; i<fila; i++)
for (j=0; j<columna; j++)
m[i][j] = m[i][j] - m[t][j]*divisores[i];

fila_pivote++;
}
}