Coder Social home page Coder Social logo

Comments (1)

gopher-atz avatar gopher-atz commented on August 25, 2024

You are right, that's a leftover from the very first version of 4klang where a generic power function was called with the base provided by the caller.
Same applies to the comments.

It should be safe to modify it, as you already said.
I'll update the repo, once i checked all the recent incoming comments/bugs.

Thanks for the hint!

P.S:
The original function looked like this:

; //----------------------------------------------------------------------------------------
; //	Power function
; //----------------------------------------------------------------------------------------
; //	Input :		st0		:	base
; //			st1		:	exponent
; //	Output:		st0		:	result
; //----------------------------------------------------------------------------------------
go4kPower:				; // base			exp
	fyl2x				; // log2_base		-
	fld	st0			; // log2_base		log2_base
	frndint				; // (int)log2_base	log2_base
	fxch				; // log2_base		(int)log2_base
	fsub	st0, st1		; // (frac)log2_base	(int)log2_base
	f2xm1				; // 2 ^ '' -	1		(int)log2_base
	fld1				; // 1				2 ^ '' -	1		(int)log2_base
	faddp	st1, st0		; // 2 ^ ''			(int)log2_base
	fscale			
	fstp	st1
	ret	

from 4klang.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.