About varocarbas.com

--

About me

--

Contact me

--

Visit customsolvers.com, my main website

--

Valid markup

--

Valid CSS

--

© 2015-2017 Alvaro Carballo Garcia

--

URL friendly

--

Optimised for 1920x1080 - Proudly mobile unfriendly

R&D projects RSS feed

All projects in full-screen mode

PDFs:

Project 10

Project 9

Project 8

FlexibleParser code analysis:

UnitParser

NumberParser

Tools:

Chromatic encryption

(v. 1.3)

Pages in customsolvers.com:

Upcoming additions

Failed projects

Active crawling bots:

Ranking type 2

(
)

FlexibleParser raw data:

Unit conversion (UnitParser)

Compound types (UnitParser)

Timezones (DateParser)

Currently active or soon to be updated:

Domain ranking

NO NEW PROJECTS:
Project 10 is expected to be the last formal project of varocarbas.com. I will continue using this site as my main self-promotional R&D-focused online resource, but by relying on other more adequate formats like domain ranking.
Note that the last versions of all the successfully completed projects (5 to 10) will always be available.
PROJECT 10
Completed (24 days)

Algorithm >

Integer exponentiation

Completed (57 days)
Completed (26 days)
Completed (47 days)
Completed (19 days)
Completed (14 days)
Non-floating-point fractional exponentiation approach
Completed on 16-Nov-2016 (24 days)

Project 10 in full-screenProject 10 in PDF

The integer exponentiation method (i.e., the one being called when using Math2.PowDecimal with an integer exponent) is PowIntegerPositive. It implements an exponentiation by squaring approach and relies on the decimal type, either directly or indirectly through Number. As indicated by its name and equivalently to what happens with the fractional exponentiation, this method only expects positive inputs.

In calculations involving non-integer exponents, PowIntegerPositive is called at least twice: when determining the root of the exponent denominator and when raising that result to its numerator. In that first scenario, various calls are likely to occur because the root finding algorithm, despite converging quite quickly (custom-improved Newton-Raphson), usually needs various iterations.

Contrarily to what happens in the fractional part, the current version of the integer exponentiation algorithm might even compete in speed with the native version (i.e., System.Math.Pow with integer exponents). In any case, the following two issues would need to be taken into account:
  • Just the fact of being part of the .NET Framework itself (Pow) or of a library created in a .NET language (PowDecimal) represents an unmeasurable uncertainty which affects the reliability of the measurements. Note that the open-source essence isn't helpful here as far as the Pow/Sqrt source codes haven't been made public. So in principle (i.e., without Microsoft's help), there is no way around this issue.
  • Number is the most efficient NumberX, but it performs notably worse than a native type like decimal. For NumberParser, Number is undoubtedly the best option; for performance-measuring purposes, it would be better to replace these variables with native ones.