..Bmax and scientific use...
BlitzMax Forums/BlitzMax Programming/..Bmax and scientific use...
| ||
..if you would like to use Bmax in such way, is there any serious limitation in Bmax for such use?? |
| ||
I'm sure you will need a arbitrary precision math module. Check brucey's BaH.MAPM |
| ||
Alas, BlitzMax is a "Games Programming Language" :-( |
| ||
Yeah, I don't think it would be a good fit - you'll need arbitrary precision maths and there are no libraries of useful scientific functions. Have you seen SciPy? |
| ||
try this test code :Local value:Double Local i,j,k:Int For i=1 To 10 For j=1 To 1000 For k=1 To 1000 value=Tan(ATan(10^(Log10(Sqr(value*value)))))+1 Next Next Next Print String(value) the result would be : 10000001,0001 in fortran blitzmax : 100009576,2290 delphi : 10000001,0011137 purebasic : 1708221.5000000533 gfabasic 32 : 10000001,0010595 freebasic : 10000000,92740968 |
| ||
poorbasic^^ .. well, i think it highly depends on what u mean with "scientific". I'd hardly use it for sattelite or particle accelerator control, but testing NNs works great! |
| ||
BaH.MAPM is good for arbitrary precision maths. BaH.MathToolkit has a large assortment of statistical distributions, including Binomial, Cauchy, Pareto, Weibull and Students. As well as a selection of "special functions", including Bessel, Neumann, Gamma, Zeta and Factorial. BaH.muParser is an extendible math parser. Haven't got around to doing any others yet - finding non-GPL'd libraries is difficult. All available from HERE. (Note, that mathtoolkit also requires BaH.Boost - there's a combi download available with both) |
| ||
with the variable value not initialized and therefore assumed to be 0, why does it work? shouldn't log10(0) return a NaN? |
| ||
. |
| ||
shouldn't log10(0) return a NaN? It actually returns -Infinity, the limiting value of Log10( x ) as x goes to 0 through positive numbers. Similarly, 10^( -Infinity ) is 1/Infinity, i.e. 0. |