Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
madmountain
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 27th Mar 2003 04:26
could someone showe me the error here??

x as double float
y as double float
x=3.433323E-23
y=5.989E+89
x= x*y
Print x
wait key
end

when I try this I get variable does no exist. could someon just please show me how this should be written? send the result to [email protected]
I am just a new user and trying to write simulations in electrostatics.

madmountain
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 27th Mar 2003 05:02
x as double float
y as double float
x = 3.43332323
y = 5.98989
x= x*y
Print x
wait key
end

The "E + 89" is throwing it off. It thinks "E" is a variable

Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 27th Mar 2003 14:51
i try


E is not a functions,it just print put it in when a float get to big to print.

--Dr 0--


Most people are other people.Their thoughts are someone else`s opinions,thier lives a mimicry,their passions a quotation
Oscar Wilde
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 27th Mar 2003 16:19
The enumeration was working for the variable "x"... Not sure why it wouldn't with "y"... Glad to see the issue though before I've tried to use enumeration. Seems to be more wise to write it out (10^89), as you have done here.

madmountain
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 27th Mar 2003 18:25
neither of the above work. did you try them?

Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 28th Mar 2003 01:01
no i have try them now and ever work.
why:
1)when DB do`s mahts it ownle ues SINGEL FLOAT not double float so float are in the Range 3.4E +/- 38 5.989E+89 not 1.7E +/- 308.so you can`t set a number to 5.989E+89 yet.

2)you need to put "." in all the number or it do`s the mahts as INTEGER not as float.

why do you need this very big numbers if you tell ues why we may be able to think of a way around uesing them.

--Dr --


Most people are other people.Their thoughts are someone else`s opinions,thier lives a mimicry,their passions a quotation
Oscar Wilde
madmountain
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 28th Mar 2003 19:28
DB pro is supposed to support double float.
the reasom I need them is that i am modeling self-organizing systems based on electrostatic theory. the values used are for electrostatic charge, electron mass, interatomic distance etc.

according to the documentation double float should work or is dark basic pro just another piece of crap?

madmountain

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Mar 2003 19:58 Edited at: 28th Mar 2003 20:24
I think you'll find its the PRINT command thats causing a problem, it seems that it cant handle very large (or very small numbers).

I can't seem to get any value greater than 5.989*(10^16) printed correctly...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
mimesis
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 28th Mar 2003 20:31
@MrTAToad

How can u be so sure the Print command is the problem ?
Maybe DBP math routines are not so good afterall, thats what I think the problem is
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Mar 2003 20:56 Edited at: 28th Mar 2003 21:05
Because it works with normal numbers. Once it reaches very large or very small numbers, it has trouble printing...

If you want to convert the usual way of writing exponent values to a double float, you might like to use my VALD command. The only problem is that if you try to print any value greater than 1E5, you get the exponent value back :

PRINT VALD("1E7") - displays 1E+007...
You can get a bit further using STR$ to extend the exponent range up to E15, like so :
print str$(valD("1E15"))

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 28th Mar 2003 21:11


Bu$herie
How many civilians is he going to kill ? I know that Bush will sit at God's left, next to Saddam.
Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 29th Mar 2003 03:06 Edited at: 29th Mar 2003 13:35
madmountain: DB pro is good for makeing games but not good for doing compex Mahts or Physics for that you need sum thing like fortan.

the way around uesing big numbers
1)do all the algber "this the way it's spell" you may be able to get reed of a lot of big constants.

2)ues no SI units ie nanometers,electron volts.

if you post sum of the Mahts i`l have a look at it.

--Dr 0--


Most people are other people.Their thoughts are someone else`s opinions,thier lives a mimicry,their passions a quotation
Oscar Wilde
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Mar 2003 10:17
I've got a plug-in that handles first & second order Bessel functions...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
madmountain
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 31st Mar 2003 04:14
I cant believe this this should be absolutely elimentary. I wrote to the "support" people and there is no response, I really cant believe that such an elemetary concept is missing in a piece of software that touts itsself so highly.

what a load of horseshit, and for those that responded and say that these elementary operations arn't supported or supportable is an absolute joke and defense of sloppy and incompetent software developers.

madmountain

EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 31st Mar 2003 05:50
Either DBPro can add/subtract/multiply/divide or it can't. There's no middle ground here. You guys should just get outta here with yer, "You should use FORTRAN" stuff... this isn't the dark ages it's Dark Basic.

madmountain, what you are proposing is that the compiler accepts real numbers in "E" notation (typically called SCIENTIFIC NOTATION). Heck, calculators from the 70s used to accept that! I don't know if DBPro is supposed to accept number in that format, but it doesn't appear to. Most compilers do (especially if they call themselves "Professional"). 1.2345e+27 should be a valid numeric format for a float literal. But it doesn't appear to be in DBPRo.

As far as the "PRINT" command goes, if the language supports double float, then PRINT can't just "punt" or "give up" when you pass it a double float. It's a bug!

Report this stuff to [email protected] and get it fixed for everyone's sake. What good are double float datatypes if you can't 1) enter them as literals in code, 2) print them out?

Login to post a reply

Server time is: 2026-07-21 20:34:26
Your offset time is: 2026-07-21 20:34:26