News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Hyper (precision) numeric data type

Started by i Z !, October 15, 2023, 07:38:52 PM

Previous topic - Next topic

i Z !



- A bug in the Add procedure has been found, squashed and burnt alive
- Decimal exponent now supported in the input string, i.e. New Hyper("123.221e-5510")
- Add(Int64, Exp64) function added to perform addition on a single Digit.
- Incr, Decr operations added
- Intellisense descriptions now (finally) work


Quote from: jack on November 01, 2023, 06:19:08 AMPS I don't like installers, if it can be helped I would rather have zip archive
I see, we'll see :)

jj2007

Quote from: i Z ! on November 01, 2023, 07:15:38 PMbtw references with examples are also available now

Good, but even better would be a complete example that builds with the Masm64 SDK :thumbsup:

Quote from: i Z ! on November 02, 2023, 01:21:43 PMv1.1.0

Jotti reports it as Trojan.MSIL.Crypt. Nonetheless I tried to run the installer and got a few errors, see below (Win7-64). Re Access to path 'iZ!' denied.: I created C:\iZ! manually, no problem, but the installer still complains.

QuoteInformation on how to invoke JIT (Just-In-Time) debugging instead of this window
is given at the bottom of the message.

************** Exception text **************
System.UnauthorizedAccessException: Access to path 'iZ!' denied.
  in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath).
  in System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
  in System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
  in Install_Hyper_Data_Type.Form1.inst()
  in Install_Hyper_Data_Type.Form1.InstallBtn_Click(Object sender, EventArgs e)
  in System.Windows.Forms.Control.OnClick(EventArgs e)
  in System.Windows.Forms.Button.OnClick(EventArgs e)
  in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  in System.Windows.Forms.Control.WndProc(Message& m)
  in System.Windows.Forms.ButtonBase.WndProc(Message& m)
  in System.Windows.Forms.Button.WndProc(Message& m)
  in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assembly loaded **************
mscorlib
    Assembly version: 4.0.0.0
    Win32 version: 4.8.4110.0 built by: NET48REL1LAST_B
    Code base: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Install Hyper Data Type
    Assembly Version: 1.0.5.0
    Win32 version: 1.0.5.0
    Code base: file:///C:/Users/Jochen/Downloads/Install_Hyper_Data_Type.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly version: 10.0.0.0
    Win32 version: 14.8.3761.0 built by: NET48REL1
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly version: 4.0.0.0
    Win32 version: 4.8.4110.0 built by: NET48REL1LAST_B
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly version: 4.0.0.0
    Win32 version: 4.8.4110.0 built by: NET48REL1LAST_B
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly version: 4.0.0.0
    Win32 version: 4.8.4110.0 built by: NET48REL1LAST_B
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly version: 4.0.0.0
    Win32 version: 4.8.3761.0 built by: NET48REL1
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly version: 4.0.0.0
    Win32 version: 4.8.3761.0 built by: NET48REL1
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly version: 4.0.0.0
    Win32 version: 4.8.3761.0 built by: NET48REL1
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly version: 4.0.0.0
    Win32 version: 4.8.3761.0 built by: NET48REL1
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
mscorlib.resources
    Assembly version: 4.0.0.0
    Win32 version: 4.6.1055.0 built by: NETFXREL2
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0_en_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    Assembly version: 4.0.0.0
    Win32 version: 4.6.1055.0 built by: NETFXREL2
    Code base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0_en_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Debug JIT **************
To enable JIT debugging, you need to set the value
jitDebugging in the system.windows.forms section of the configuration file
of the application or computer (machine.config).
The application also must be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, all unhandled exceptions

i Z !

#47
Quote from: jj2007 on November 02, 2023, 07:41:51 PMGood, but even better would be a complete example that builds with the Masm64 SDK :thumbsup:
I created C:\iZ! manually, no problem, but the installer still complains.

thanks JJ, the lib installs into 64bit %PROGRAMFILES% -> "C:\Program Files\iZ!\Hyper Data Type\", it puts in the dll, xml(for intellisense), licence.txt and uninstall.exe.  It also copies/overwrites Hyper Core.dll
in the System32 dir, so the native dll is accessible.

I just realized I forgot to change version in the installer itself. So it's still writing registry entries for v1.0.4.0. But that shouldn't be a problem.

Masm64 SDK? I don't know much about it.. Anyway only the algo's for arithmetics can be used from "Hyper Core", I'll soon write the documentation. It would be good I guess to have an entirely native lib too, if someone cares to write it.

i Z !

Be sure to run it as Administrator, if it doesn't automatically ask you to elevate rights after running it

jj2007

Quote from: i Z ! on November 02, 2023, 09:42:11 PMBe sure to run it as Administrator, if it doesn't automatically ask you to elevate rights after running it
Why should I run a program as administrator that just gives me a DLL??

i Z !

Quote from: jj2007 on November 02, 2023, 10:09:56 PMWhy should I run a program as administrator that just gives me a DLL??

To allow it access for registering as a Framework library (in registry) and allow creation of folders and copying into System32 dir (for the mentioned "Hyper Core.dll").

jack

#51
hi iZ!
if I were you, I would write the DLL in C, I wrote some MP code in FreeBasic and in C and just now in VB.net
I did a simple test, set the precision to 51200 and then
n = str2fp("7." + StrDup(precision, "7"))
m = str2fp("9." + StrDup(precision, "9"))

m = n / m
m = Sqr(m)

timing of the functions in red not counting conversions
VB.net in release build took .53 seconds
FB took .12 seconds
C took .03 seconds

but since this is an asm forum, why not write your code in masm?
or maybe in MasmBasic https://masm32.com/board/index.php?board=57.0

i Z !

Quote from: jack on November 03, 2023, 08:57:32 AMhi iZ!
if I were you, I would write the DLL in C
nope, that's a negative - if you were me, you couldn't stand a single line of C code in your projects  :smiley:

Quote from: jack on November 03, 2023, 08:57:32 AMn = str2fp("7." + StrDup(precision, "7"))
What does this function do? I thought that C# produces the same code as VB (at least for calling the common functions)

btw, you can now test out your MP Division procedure, since Hyper now does also accept strings as "1.1234e-50" ... Not the fastest Double->Hyper conversion, but it's good enough for 'proof of concept'

jj2007

Quote from: i Z ! on November 02, 2023, 10:55:09 PM
Quote from: jj2007 on November 02, 2023, 10:09:56 PMWhy should I run a program as administrator that just gives me a DLL??

To allow it access for registering as a Framework library (in registry) and allow creation of folders and copying into System32 dir (for the mentioned "Hyper Core.dll").

I will not allow that. None of my code published here writes to the registry or attempts to change C:\Windows\*

i Z !

Quote from: jj2007 on November 03, 2023, 08:46:48 PMI will not allow that. None of my code published here writes to the registry or attempts to change C:\Windows\*
Well, I don't think it's possible to register a .NET library in other way than in registry.
Also it writes (into separate registry entries) the uninstall info, so you can uninstall the library under Settings / Apps & Features
What I can offer is only the ability to choose the installation folder and put in there the native dll as well. But then, this folder would have to be put into the PATH variable, which would again require Admin rights

i Z !

#55
as some of you may know, the art of making a functional installer is making an uninstaller, which self-destructs (you can't do that in any language while .exe is running) and deletes the folder containing it at the end

stoo23

QuoteAttention, don't click the link. The new improved version of the SMF forum software adds links to known web extensions like garbage.net or garbage.inc, so you may randomly end up with strange pages like Windows.inc

I learnt to avoid that trap by using another "i": Windows.ìnc - no link :biggrin:
NB: Please NOTE, I have 'Fixed' this issue.
I had inadvertently selected a Check-Box in the Admin' controls to Automatically 'link' Posted URL's
This has now been De-selected, so you will need to utilize BBcode tags or the 'Link' Button in the Editor to Post an Actual URL.
Cheers
 :smiley:

NoCforMe

Quote from: i Z ! on November 03, 2023, 08:41:11 PM
Quote from: jack on November 03, 2023, 08:57:32 AMhi iZ!
if I were you, I would write the DLL in C
nope, that's a negative - if you were me, you couldn't stand a single line of C code in your projects  :smiley:

Hmm; I see I'm not the only one here ...
Assembly language programming should be fun. That's why I do it.

i Z !

Who wants, can now download the native library here (@ the main page)

references - native