Convert SQL function into RPG (or C) language

Avg Bid (USD)
Project Budget (USD)
$30 - $250

Project Description:
There's a SQL function that needs to be translated into RPG (or C) language.
All the functionality in translated function has to be exactly as in the original. In the bidding, please mention the language you'll use for the outcome (RPG or C).
Below please review the original SQL function.

Thank you!

drop function dbo.PMT
create function dbo.PMT
-- Datetype for @rate changed to float
@rate float,
@periods smallint,
@principal numeric(20,2)
returns numeric (38,9)
declare @pmt numeric (38,9)

declare @WK_periods float,
@WK_principal float,
@wk_One float,
@WK_power float

-- Convert data for calculation
select @WK_periods = @periods,
@WK_principal = @principal,
@WK_One = 1

select @pmt =
-- Do all multiplication before division
( @WK_principal * (@rate*power(@WK_One+@rate,@WK_periods)))
/ (power(@WK_One+@rate,@WK_periods)-@WK_One)

return @pmt


Skills required:
C Programming, C++ Programming, MMORPG, Script Install, SQL
Hire kimosrolling
Project posted by:
kimosrolling Egypt
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

$ 30
in 1 days
Hire miktug
$ 30
in 1 days
Hire vishram0709
$ 30
in 1 days
Hire nhanphanmem
$ 30
in 1 days