Re: Need help to convert my C++ codes to Java with GUI

On Sat, 23 Feb 2008 20:42:18 -0800 (PST), Katak
<vampireex@xxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :

Sorry. I think it was meant to be exponent since I was doing decimal =
binary * 2^1 , decimal = binary * 2*2, etc. Named it wrongly.

In that case you can often use a loop to incrementally create a power,
especially if you need to intermediate values.

pow *= base;

You can create powers of two with left shifts. e.g.

1 << 3 == 8

Roedy Green Canadian Mind Products
The Java Glossary

Relevant Pages

  • Re: Idle Curiosity -- 4-20mA Signalling
    ... 4-20mA signaling loop? ... I'm curious as to how much freedom one has to power ones device when one ... designs some gizmo that flaps in the breeze on the end of a current loop. ... maximum supply voltage and calculate the maximum load resistance. ...
  • Re: More on cheater plugs
    ... Two hots for POWER and a good ground. ... interconnects, that have their 3rd wire safety pins connected to each other, ... BUT, for the sake of this gedanken experiment, the 3rd wire safeties are not ... There is a closed loop path for electrons. ...
  • Re: Battery Charge Noise/Interference on Audio Output
    ... It is in fact noise caused by an 'earth loop'. ... from the power supply. ... This depends on where you experienced your earth loop. ...
  • Re: Facing Problem in Loop
    ... it goes to infinite loop. ... Second problem is it works fine for smaller value of X or N but not ... for higher say base 15 power 20. ... double base, pwr; ...
  • Re: RF Exposure from Small Transmitting Loops
    ... small transmitting loop compared to a dipole ... RF power density may be greater [than it would be at the same distance ... from the dipole apex] since the radiating volume is smaller. ...