Code:

KiXtart
KiXtart Version = 4.23
KiXGolf Script = kixgolf_bta.kix

Computer
OS = Windows XP Home Edition
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 512 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Balanced Terniary Addition
Processing Start = 2005/02/23 10:40:50.515
Processing End = 2005/02/23 10:41:27.437
Duration = 0000/00/00 00:00:36.921
# Tests Run = 106
# Tests Passed = 106
# Tests Failed = 0
Result = passed
KiXGolf Score = 209

Thank you for participating in KiXtart Golf!


Code:

; begin Balanced Terniary Additions
;!
Function BTA($b,$c)
dim $,$x
if $c
for $=-729 to -$
$x=$x+$*($b=bta($,0))+$*($c=bta($,0))
next
$x=bta($x,0)
else
$c=729
while $c
$=1-2*($b<0)
$=$*($*2*$b>$c)
$b=$b-$*$c
if $x | $ | $c=1 $x=$x+""+$ endif
$c=$c/3
loop
endif
$bta=$x
EndFunction
;!
;!
; end Balanced Terniary Additions

_________________________
!

download KiXnet