Skip to content

Commit

Permalink
space
Browse files Browse the repository at this point in the history
  • Loading branch information
balasan committed Mar 22, 2018
1 parent d07663b commit d6a8248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/math/Power.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pragma solidity ^0.4.18;


/**
* bancor formula by bancor
* https://github.com/bancorprotocol/contracts
* @title Bancor Formula by Bancor
* @dev https://github.com/bancorprotocol/contracts
* Modified from the original by Slava Balasanov
* Split Power.sol out from BancorFormula.sol
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
Expand Down Expand Up @@ -184,7 +184,7 @@ contract Power {
This maximum exponent depends on the "precision" used, and it is given by "maxExpArray[precision] >> (MAX_PRECISION - precision)".
Hence we need to determine the highest precision which can be used for the given input, before calling the exponentiation function.
This allows us to compute "base ^ exp" with maximum accuracy and without exceeding 256 bits in any of the intermediate computations.
*/
*/
function power(uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD) internal constant returns (uint256, uint8) {
uint256 lnBaseTimesExp = ln(_baseN, _baseD) * _expN / _expD;
uint8 precision = findPositionInMaxExpArray(lnBaseTimesExp);
Expand Down

0 comments on commit d6a8248

Please sign in to comment.