Programa para el testeo de las funciones.
Programa para el testeo de las funciones.Para compilar o código example_matrixmath.cpp:
Para executar o programa:
Retornando por consola:
A: 0.78539816339745 0.78539816339745 0.78539816339745 0.78539816339745 sin(A): 0.70710678118655 0.70710678118655 0.70710678118655 0.70710678118655 cos(A): 0.70710678118655 0.70710678118655 0.70710678118655 0.70710678118655 tan(A): 1 1 1 1 A: 1 1 1 1 exp(A): 2.718281828459 2.718281828459 2.718281828459 2.718281828459 TwoExp(A): 2 2 2 2 ln(A): 0 0 0 0 log2A): 0 0 0 0 log10(A): 0 0 0 0 A: 2 2 2 2 sqrt(A): 1.4142135623731 1.4142135623731 1.4142135623731 1.4142135623731 A: -2 -1 0 1 2 sqnl(A): -1 -0.75 0 0.75 1 gaussian(A): 0.018315638888734 0.36787944117144 1 0.36787944117144 0.018315638888734 tanh(A): -0.96402758007582 -0.76159415595576 0 0.76159415595576 0.96402758007582 sigmoid(A): 0.11920292202212 0.26894142137 0.5 0.73105857863 0.88079707797788 logit(sigmoid(A)): -2 -1 0 1 2 sinc(A): 0.45464871341284 0.8414709848079 1 0.8414709848079 0.45464871341284 A: 0.84018771676347 0.39438292663544 0.78309922339395 0.79844003310427 0.91164735751227 Hb(A): 0.6338602873708 0.9675698350791 0.75446789805827 0.72503707875216 0.43094711768241 A: 0.29243617614415 0.092202507641789 -1.0743635946361 -0.65705834043996 -2.4575761653009 round(A): 0 0 -1 -1 -2 sign(A): 1 1 -1 -1 -1 B1: 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 B2: 1 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 B1.IsEqualTo(B2): 0 0 0 1 0 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 B1.CountRoundEqualIn(B2): 57 B1.Accuracy(B2,0.5): 0.57 Pds::Accuracy(B1,B2): 0.57 Pds::AccuracyBatchBlock({{B1}},{{B2}}): 0.57 B1.NAccuracy(B2): 0.57 Pds::NAccuracy(B1,B2): 0.57 Pds::SignNZ(+1)1 Pds::SignNZ( 0)1 Pds::SignNZ(-1)-1
Código example_matrixmath.cpp: