mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Remove unnecessary leading line whitespace before a tab
This commit is contained in:
@@ -186,7 +186,7 @@ bernoulli.cal
|
||||
Calculate the nth Bernoulli number.
|
||||
|
||||
NOTE: There is now a bernoulli() builtin function. This file is
|
||||
left here for backward compatibility and now simply returns
|
||||
left here for backward compatibility and now simply returns
|
||||
the builtin function.
|
||||
|
||||
|
||||
@@ -767,7 +767,7 @@ lucas.cal
|
||||
prove that h*2^n-1 is prime or not prime.
|
||||
|
||||
NOTE: Some call this term u(0). The function gen_u0(h, n, v1)
|
||||
simply calls gen_u2(h, n, v1) for such people. :-)
|
||||
simply calls gen_u2(h, n, v1) for such people. :-)
|
||||
|
||||
gen_v1(h, v)
|
||||
|
||||
@@ -1467,7 +1467,7 @@ sumtimes.cal
|
||||
the list or matrix to use. The doalltimes() function will run
|
||||
all of the sumtimes tests. For example:
|
||||
|
||||
doalltimes(1e6);
|
||||
doalltimes(1e6);
|
||||
|
||||
|
||||
surd.cal
|
||||
|
@@ -474,7 +474,7 @@ define best_mul2()
|
||||
*/
|
||||
while (low+1 < high) {
|
||||
|
||||
/* try the mid-point */
|
||||
/* try the mid-point */
|
||||
mid = int((low+high)/2);
|
||||
if (config("user_debug") > 0) {
|
||||
printf("testing multiply alg1/alg2 ratio for len = %d\n", mid);
|
||||
@@ -956,7 +956,7 @@ define best_sq2()
|
||||
*/
|
||||
while (low+1 < high) {
|
||||
|
||||
/* try the mid-point */
|
||||
/* try the mid-point */
|
||||
mid = int((low+high)/2);
|
||||
if (config("user_debug") > 0) {
|
||||
printf("testing square alg1/alg2 ratio for len = %d\n", mid);
|
||||
@@ -1455,7 +1455,7 @@ define best_pow2()
|
||||
*/
|
||||
while (low+1 < high) {
|
||||
|
||||
/* try the mid-point */
|
||||
/* try the mid-point */
|
||||
mid = int((low+high)/2);
|
||||
if (config("user_debug") > 0) {
|
||||
printf("testing pow2 alg1/alg2 ratio for len = %d\n", mid);
|
||||
|
@@ -40,7 +40,7 @@ define Z(x, eps_term)
|
||||
|
||||
/* obtain the error term */
|
||||
if (isnull(eps_term)) {
|
||||
eps = epsilon();
|
||||
eps = epsilon();
|
||||
} else {
|
||||
eps = eps_term;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ define P(x, eps_term)
|
||||
|
||||
/* obtain the error term */
|
||||
if (isnull(eps_term)) {
|
||||
eps = epsilon();
|
||||
eps = epsilon();
|
||||
} else {
|
||||
eps = eps_term;
|
||||
}
|
||||
|
@@ -188,7 +188,7 @@ define dms_abs(a)
|
||||
|
||||
/* firewall - just absolute value non dms objects */
|
||||
if (! istype(a, ans)) {
|
||||
return abs(a);
|
||||
return abs(a);
|
||||
}
|
||||
|
||||
/* compute degrees */
|
||||
|
@@ -157,7 +157,7 @@ define dotest(dotest_file, dotest_code = 0, dotest_maxcond = -1)
|
||||
* test the close of the line file
|
||||
*/
|
||||
printf("%d-: detected %d error condition(s), many of which may be OK\n",
|
||||
dotest_code, dotest_old_errcount-dotest_errcnt);
|
||||
dotest_code, dotest_old_errcount-dotest_errcnt);
|
||||
printf("%d-: closing line file: %d\n", dotest_code, dotest_file);
|
||||
fclose(dotest_f_file);
|
||||
|
||||
|
@@ -56,7 +56,7 @@ define __CZ__factor_factorial(n,start){
|
||||
if(start){
|
||||
if(!isint(start) && start < 0 && start > n)
|
||||
return newerror("__CZ__factor_factorial(n,start): value of "
|
||||
"parameter 'start' out of range");
|
||||
"parameter 'start' out of range");
|
||||
if(start == n && isprime(n)){
|
||||
prime_list = mat[1 , 2];
|
||||
prime_list[0,0] = n;
|
||||
@@ -64,7 +64,7 @@ define __CZ__factor_factorial(n,start){
|
||||
}
|
||||
else if(!isprime(start) && nextprime(start) >n)
|
||||
return newerror("__CZ__factor_factorial(n,start): value of parameter "
|
||||
"'start' out of range");
|
||||
"'start' out of range");
|
||||
else{
|
||||
if(!isprime(start)) prime = nextprime(start);
|
||||
else prime = start;
|
||||
@@ -225,11 +225,11 @@ define __CZ__multiply_factored_factorial(matrix,stop){
|
||||
|
||||
if(!ismat(matrix))
|
||||
return newerror("__CZ__multiply_factored_factorial(matrix): "
|
||||
"argument matrix not a matrix ");
|
||||
"argument matrix not a matrix ");
|
||||
if(!matrix[0,0])
|
||||
return
|
||||
newerror("__CZ__multiply_factored_factorial(matrix): "
|
||||
"matrix[0,0] is null/0");
|
||||
"matrix[0,0] is null/0");
|
||||
|
||||
if(!isnull(stop))
|
||||
pix = stop;
|
||||
@@ -376,7 +376,7 @@ define bigcatalan(n){
|
||||
|
||||
/*
|
||||
df(-111) = -1/3472059605858239446587523014902616804783337112829102414124928
|
||||
7753332469144201839599609375
|
||||
7753332469144201839599609375
|
||||
|
||||
df(-3+1i) = 0.12532538977287649201-0.0502372106177184607i
|
||||
df(2n + 1) = (2*n)!/(n!*2^n)
|
||||
@@ -427,7 +427,7 @@ define doublefactorial(n){
|
||||
*/
|
||||
eps=epsilon(epsilon()*1e-2);
|
||||
ret = 2^(n/2-1/4 * cos(pi()* n)+1/4) * pi()^(1/4 *
|
||||
cos(pi()* n)-1/4)* gamma(n/2+1);
|
||||
cos(pi()* n)-1/4)* gamma(n/2+1);
|
||||
epsilon(eps);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -188,7 +188,7 @@ define hms_abs(a)
|
||||
|
||||
/* firewall - just absolute value non hms objects */
|
||||
if (! istype(a, ans)) {
|
||||
return abs(a);
|
||||
return abs(a);
|
||||
}
|
||||
|
||||
/* compute hours */
|
||||
|
@@ -156,7 +156,7 @@ define be2file(v, filename)
|
||||
*/
|
||||
octlen = int((highbit(v)+8) / 8);
|
||||
for (i=octlen-1; i >= 0; --i) {
|
||||
fputc(fd, char(v >> (i*8)));
|
||||
fputc(fd, char(v >> (i*8)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -731,7 +731,7 @@ rodseth_xhn(x, h, n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check for jacobi(x-2, h*2^n-1) == 1 (Ref4, condition 1) part 1
|
||||
*/
|
||||
testval = h*2^n-1;
|
||||
@@ -739,7 +739,7 @@ rodseth_xhn(x, h, n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check for jacobi(x+2, h*2^n-1) == -1 (Ref4, condition 1) part 2
|
||||
*/
|
||||
if (jacobi(x+2, testval) != -1) {
|
||||
|
@@ -336,7 +336,7 @@ define __CZ__produce_long_random_number(n)
|
||||
ret = 1;
|
||||
if(!isint(n) || n<1)
|
||||
return newerror("__CZ__produce_long_random_number(n): "
|
||||
"n is not an integer >=1");
|
||||
"n is not an integer >=1");
|
||||
for(k=0;k<n;k++){
|
||||
ret += random();
|
||||
ret = toomcook4square(ret);
|
||||
|
@@ -72,7 +72,7 @@ define hurwitzzeta(s,a){
|
||||
limit=(precision*ln(10)-re((s-.5)*result)+(1.*realpart_a)*ln(2.*pi()))/2;
|
||||
limit=max(2,ceil(max(limit,abs(s*1.)/2)));
|
||||
limit_function=ceil(sqrt((limit+realpart_a/2-.25)^2+(imagpart_s*1.)^2/4)/
|
||||
pi());
|
||||
pi());
|
||||
if (config("user_debug") > 0) {
|
||||
print "limit_function = " limit_function;
|
||||
print "limit = " limit;
|
||||
|
Reference in New Issue
Block a user