#include <stdio.h>
// matrix multiply float?
void matmulf(double *y , double A[][2], double *x)
{
y[0] = A[0][0] * x[0] + A[0][1] * x[1];
y[1] = A[1][0] * x[0] + A[1][1] * x[1];
}
int main()
{
double A[][2] = {
{1,0},
{0,1},
};
double x[] = {10,20};
double y[2];
matmulf(y, A, x);
printf("y=(%f,%f)\n", y
[0], y
[1]); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovLyBtYXRyaXggbXVsdGlwbHkgZmxvYXQ/CnZvaWQgbWF0bXVsZihkb3VibGUgKnkgLCBkb3VibGUgQVtdWzJdLCBkb3VibGUgKngpCnsKCXlbMF0gPSBBWzBdWzBdICogeFswXSArIEFbMF1bMV0gKiB4WzFdOwoJeVsxXSA9IEFbMV1bMF0gKiB4WzBdICsgQVsxXVsxXSAqIHhbMV07Cn0KCmludCBtYWluKCkKewoJZG91YmxlIEFbXVsyXSA9IHsKCQl7MSwwfSwKCQl7MCwxfSwKCX07Cglkb3VibGUgeFtdID0gezEwLDIwfTsKCWRvdWJsZSB5WzJdOwoKCW1hdG11bGYoeSwgQSwgeCk7CglwcmludGYoInk9KCVmLCVmKVxuIiwgeVswXSwgeVsxXSk7CglyZXR1cm4gMDsKfQo=