Page 1 of 2

Double Precision aritmatic

Posted: Tue Aug 22, 2017 2:21 am
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

Re: Double Precision aritmatic

Posted: Tue Aug 22, 2017 5:20 am
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

Re: Double Precision aritmatic

Posted: Wed Aug 23, 2017 5:37 pm
by bluebird
Thanks. The double precision does not apply to numeric value in memory I guess.

Re: Double Precision aritmatic

Posted: Wed Aug 23, 2017 10:17 pm
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

Re: Double Precision aritmatic

Posted: Thu Aug 24, 2017 5:02 am
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

Re: Double Precision aritmatic

Posted: Thu Aug 24, 2017 6:12 am
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

Re: Double Precision aritmatic

Posted: Thu Aug 24, 2017 2:51 pm
by bluebird
Thanks for sharing your gallery. I see that I have lots to do to make mine more sophisticated.

Re: Double Precision aritmatic

Posted: Thu Aug 24, 2017 4:11 pm
by CalScot
Amazing gallery, Rathi. Thanks for sharing it.

Re: Double Precision aritmatic

Posted: Fri Aug 25, 2017 9:40 am
by nekbmm
1+

Re: Double Precision aritmatic

Posted: Fri Aug 25, 2017 10:14 am
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