Recent

Author Topic: Bugfixing mparith (Wolfgang Ehrhardt's code) & Extended record enumerators  (Read 889 times)

TRon

  • Sr. Member
  • ****
  • Posts: 423
Though the definition of EXT64 could also be improved like this:

Code: Pascal  [Select][+][-]
  1. {$ifndef FPC_HAS_TYPE_EXTENDED}
  2.   {$define EXT64}
  3. {$endif}

After all Extended isn't available for most platforms and also not for Win64.
Certainly true, except that the include files from Wolfgang seems to be a tad more complicated than that to be able to add/include that without care.

Seems that cpu64 define is checked , which in turn defines the bit64 define. the win64 define is checked to take care of defining EXT64.

Depending on the bitxx define (16, 32 or 64) it seems to 'switch' between defining extended as double or a real/simulated extended.


@alextp
I do believe that inside mpconf.inc a similar adjustment is required. Now it reads:
Code: Pascal  [Select][+][-]
  1. {$ifndef MPC_PurePascal}
  2.   {$ifdef BIT64}
  3.     {$define MPC_PurePascal}
  4.   {$endif}
  5.   {$ifdef CPUARM}
  6.     {$define MPC_PurePascal}
  7.   {$endif}
  8. {$endif}
  9.  

Alextp

  • Hero Member
  • *****
  • Posts: 1048
    • UVviewsoft
Updated std.inc file in all 20+ places to last version which knows AArch64.

Alextp

  • Hero Member
  • *****
  • Posts: 1048
    • UVviewsoft
Updated mp_conf.inc too.

MathMan

  • Full Member
  • ***
  • Posts: 205
Hi
I am trying to compile mparith on a number of different computers.
It appears that mparith is still available here
https://web.archive.org/web/20190729022124/http://www.wolfgang-ehrhardt.de:80/misc_en.html#mparith
(Wolfgang passed away June 2019)

Hello dieselnutjob,

Not sure where you are heading with your interest in mparith, but i harbour the thought you might work on the library and not only with the library.

In case of working on the library the attached may be of some use - feel free. I did it some time ago, even sent it to Wolfgang Erhardt, but too late unfortunately.

PS - I just re-read my post and think I did not provide enough explanation why I think the attached benchmark utility might be beneficial. mparith defines threshold values for selection of best suited algorithm variants - e.g. schoolbook multiply => Karatsuba multiply => Toom-Cook multiply. These thresholds are static and identical across all plattforms, which is not the best choice. I used the benchmark utility to identify the optimal selection for the thresholds on my PC. With these I could generate speed improvements between 200%-300%.

Kind regards,
MathMan
« Last Edit: August 02, 2020, 02:58:41 pm by MathMan »

dieselnutjob

  • Full Member
  • ***
  • Posts: 176
I helped Wolfgang with one very specific and small part of his software about ten years ago.

So basically I am just a user.

I think that his code is an absolute work of art and therefore I would like it to live on and keep using it.

I'm sure I'm not the only one.  Thank you Alextp for your efforts.

Freepascal is already ported to the new 64 bit ARM Macbooks and also I just bought a Pinebook Pro so my interest in ARM is very high at the moment.

 

TinyPortal © 2005-2018