6 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for rabadiyaronak

i have two different programs that compare float and double variales and gives output , i shown that below : 1. #include<stdio.h> main() { int r; float f=22.5; double d=22.5; r=(f==d); printf("r=%d",r); } **Output:- r=1** 2. #include<stdio.h> main() { int r; float f=22.7; double d=22.7; r=(f==d); printf("r=%d",r); } **Output:- r=0** …

Member Avatar for jwenting
0
289
Member Avatar for Labdabeta

Hello, I wrote a library for arbitrary precision arithmetic recently and spent a long time implementing efficient multiplication algorithms. Now I am looking to see if it is possible for me to optimize anywhere else. One place that I thought should be more optimizeable is my division algorithm. Right now …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Labdabeta

I need to calculate chi squared cdf from x->infinity with n=255 degrees of freedom. I cannot seem to get it to work. You can find formulae for chi squared distributions using google. Here is my non-functional approximation code: double riemannsum(double(*fnc)(double),double dx, double xmin, double xmax) { double ret=0; double x=xmin; …

Member Avatar for Labdabeta
0
595
Member Avatar for jaskij

The program is supposed to compute the values of [URL="http://mathworld.wolfram.com/GammaFunction.html"]Euler's Gamma Function[/URL] using an infinite product (formula #15 in the link), and it does so decently for low values, but the error gets too big for bigger values. Using both Mathematica and Maxima for reference this is what I get …

Member Avatar for jaskij
0
204
Member Avatar for rhuffman8

I am working in an older version of Python (2.6, I believe). I cannot update to the latest version because it is not currently compatible with the other program I need the code to run with so, unfortunately, the "decimal" module is not available to me (as far as I …

Member Avatar for Gribouillis
0
232
Member Avatar for tboz203

I've had an idea for a class that, instead of storing a number as a single floating-point value, stores the exact value as two or more integers (in cases such as division, fractional exponents, or irrational numbers such as pi or e). The class would have it's own mathematical functions …

Member Avatar for JamesCherrill
0
185

The End.