Home |
Search |
Today's Posts |
#6
![]() |
|||
|
|||
![]()
Yes, you are correct. In "C"/C++ conversion is automatic (or generates a
compiler error prompting you to "cast" to another type) if there is the slightest chance you will unintentionally lose precision... If I go to VB or Fortran I tend to get a lot of math errors (which are not caught by the compiler, but in real world use!) until I remember to compensate and control my code better... double precision is used by "C"/C++ (the "double"(integer) and "float"(floating point) variables) also (you are right, it is related to the size, in bytes(bits), of the math variable(s) in question), no problem--it is just more transparent in C. And, you are correct again, "precision" is only a matter of where you wish to "quit", and "double-double-precsion" and greater are able to be done, either as a function of the compiler, hard code a routine directy in assembly language yourself, or the programmer can institute them in the high level code... Visual Basic, Fortan, COBOL (yuck!), Pascal, "C", etc, etc are usually only a matter of syntax, style, speed and preference... "C" is just my personal preference... Years ago it was common for Basic/VB to constantly have issues with math variables (actually, changes to the functions in the OS) in each new release of windows, I live in the past... frown Warmest regards, John "Roy Lewallen" wrote in message ... John Smith wrote: I could be wrong, and Roy will correct me if I am, but EZNEC seems to be written in Visual Basic, or similar... might you need the run-time libraries for an older edition? No, that's not the problem -- it's due to DOS not being able to properly determine the size of a large amount of RAM. And the DOS versions were written with the MS BASIC Professional Development System, not Visual Basic. Windows versions of EZNEC (v. 3.0 and 4.0) are written in Visual Basic, except the calculating engines and a few speed-critical main program routines which are written in Fortran. And, he (Roy) mentions "double percision"--a nasty reality of basic (and some Fortran compilers also), which seems to confirm my suspicions... Double precision isn't a "nasty reality" -- it's simply a way of storing floating point variables. Normal precision floating point variables are stored in four byte words, and consequently have a resolution of about seven significant decimal digits. Double precision variables require 8 bytes and have about 15 significant digits of resolution. Fortran additionally has a complex data type which requires twice as much storage space, since each variable of that type has two parts. Some compilers have additional, higher precisions available. The program author can choose which data type to use for each individual variable. Roy Lewallen, W7EL |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
JvComm32 and other digisoft on WinXP | General | |||
Mismatch Uncertainty and an EZNEC transmission line sudy | Antenna | |||
EZNEC v. 4.0 at Dayton | Antenna | |||
3 antennas modeled with EZNEC | Antenna | |||
Eznec modeling loading coils? | Antenna |