Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
sqrt function
//gcc 4.9.3 #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } float syn(float *a, float *b, int dimensions) { float similarity=0; float sumup=0; float sumdown=0; float as=0; float bs=0; int i; for(i=0; i<dimensions; i++) { sumup = sumup + a[i] * b[i]; as = as + a[i] * a[i]; bs = bs + b[i] * b[i]; } sumdown = sqrtf(as) * sqrtf(bs); similarity = sumup / sumdown; return similarity; }
run
|
edit
|
history
|
help
0
test
by ren, 4 years ago
test2123
by renz, 3 years ago
Please
log in
to post a comment.
Assignment 3
program1
Project 5 v.03
Lab 7 v1.0
A_141212_HistoriaDePunteros
Mutex Safe
CALCULADORA
Multiple If statements v.09
NOT a String in C - 2
Multiple if statement v0.8
test
by ren, 4 years agotest2123
by renz, 3 years agoPlease log in to post a comment.