-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Myshrimp #4941
Myshrimp #4941
Conversation
Liu Jiawei seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
src/simplemath.cpp
Outdated
#ifdef NCNN_SIMPLEMATH | ||
#include <stdlib.h> | ||
#include<stdio.h> | ||
float absolute(float x)//����ֵ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The encoding can be improved. UTF-8 encoding recommended. Spaces around //
prefered.
i.e.
float absolute(float x) // your_comment
src/simplemath.cpp
Outdated
return x; | ||
} | ||
|
||
float Factorial(int x)//�׳� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/simplemath.cpp
Outdated
} | ||
|
||
|
||
float nth(float x, int n)//n�η� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/simplemath.cpp
Outdated
return (1 / x) * nth(x, n + 1); | ||
} | ||
} | ||
float Bernoulli(int x)//��Ŭ���� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/simplemath.cpp
Outdated
return B; | ||
} | ||
} | ||
float tan(float x)//tan(x) ���ȱ���0.000001 �����ٶ�̫�� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/simplemath.cpp
Outdated
printf("\tNaN\n"); | ||
return 0; | ||
} | ||
while (absolute(e) > accuracy && i <= 24)//���Ǽ����ٶȣ�����Bernoulli() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/simplemath.h
Outdated
#ifndef TAN_H | ||
#define TAN_H | ||
#include<stdio.h> | ||
#define pai 3.14159265 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider not using Chinese Pinyin when naming a variable.
src/platform.h.in
Outdated
@@ -15,6 +15,7 @@ | |||
#ifndef NCNN_PLATFORM_H | |||
#define NCNN_PLATFORM_H | |||
|
|||
#cmakedefine01 NCNN_SIMPLEMATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving NCNN_SIMPLEPATH
to the bottom, just like the order when src/CMakeLists.txt
.
pr closed as a much more superior simplemath implementation covered in #4905 |
No description provided.