Double Precision aritmatic

Moderator: Rathinagiri

bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Double Precision aritmatic

Post by bluebird »

Dear Helpers

Can HMG users specify single or double precision formats for floating point numbers?

If so, please explain how to specify in our code.

Thanks
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Double Precision aritmatic

Post by esgici »

Types of FIELD variables are defined in STRUCTURE of tables (.dbf files).

For other type (memory) variables, Clipper isn’t a “strong typing” language. Programmers not obliged to define variables with type before referenced (used); variables are typed “on the fly” that is by assigning value.
( https://vivaclipper.wordpress.com/2015/ ... ata-types/ )

It's possible specify a database field with "double" type by assigning "B" to type of field.

( https://vivaclipper.wordpress.com/2012/ ... n-harbour/ )

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Double Precision aritmatic

Post by bluebird »

Thanks. The double precision does not apply to numeric value in memory I guess.
PeteWG
Posts: 176
Joined: Sun Mar 21, 2010 5:45 pm

Re: Double Precision aritmatic

Post by PeteWG »

bluebird wrote: Wed Aug 23, 2017 5:37 pm Thanks. The double precision does not apply to numeric value in memory I guess.
it's not clear what you mean by "numeric value in memory" but as far as I know,
Harbour uses double numeric type which of course follows double value specification
as defined by IEEE 754, that is 53bit precision. Isn't this enough for your purpose?
Just curious, what exactly you're trying to do which makes you concerned about such thing.

regards,
Pete
bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Double Precision aritmatic

Post by bluebird »

The project I set myself is to use HMG and its Bos Taurus graphic set to program and display Mandelbrot Fractals.
The internet example codes (mostly in C language) all ask for double precision. SO I asked ig HMG can meet that requirement.

If it is 53 bit the of course that will be just fine.

Thank you for your follow up
Regards

Bill
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Double Precision aritmatic

Post by Rathinagiri »

Wow. So, you are interested in fractals?!

Fractals in HMG would be great! :)

I am mad about fractals and this is my fractal gallery for your kind information.

www.stereofractals.com
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Double Precision aritmatic

Post by bluebird »

Thanks for sharing your gallery. I see that I have lots to do to make mine more sophisticated.
User avatar
CalScot
Posts: 303
Joined: Thu Mar 21, 2013 12:22 am
Location: California

Re: Double Precision aritmatic

Post by CalScot »

Amazing gallery, Rathi. Thanks for sharing it.
User avatar
nekbmm
Posts: 118
Joined: Sat Jul 16, 2016 3:16 am
DBs Used: DBF,SQLite
Location: Ivanjica, Serbia

Re: Double Precision aritmatic

Post by nekbmm »

1+
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Double Precision aritmatic

Post by Anand »

Beautiful fractal images !

I have played with fractal generation programs and the little I understand is that they are created by generating different color lines in random but symmetrical paths. Most of the images in the gallery matches this logic, but my eye caught "fractal20170208". This one looks stunningly beautiful and not like other images.

Thanks for sharing it, Rathinagiri Sir.

Regards,

Anand
Regards,

Anand

Image
Post Reply