v05i007: xfroot, Patch1

Dan Heller argv at island.uu.net
Fri Sep 29 18:07:24 AEST 1989


Submitted-by: Ed Kubaitis <uunet!ux1.cso.uiuc.edu!ejk>
Posting-number: Volume 5, Issue 7
Archive-name: xfroot/patch1
Patch-To: xfroot: Volume 5, Issue 3

*** xfroot.c.orig	Sat Sep 23 11:14:26 1989
--- xfroot.c	Mon Sep 25 08:12:48 1989
***************
*** 90,98
  
  hopset() {
     int r = Ranfseed; double pmax=1.0*W, logpmax=log(pmax);
!    A = (A) ? A : exp(Ranf()*logpmax); if (r&2) A = -A;
!    B = (B) ? B : exp(Ranf()*logpmax); if (r&4) B = -B;
!    C = (C) ? C : Ranf()*pmax;         if (r&8) C = -C;
     }
  
  

--- 90,98 -----
  
  hopset() {
     int r = Ranfseed; double pmax=1.0*W, logpmax=log(pmax);
!    if (!A) { A = exp(Ranf()*logpmax); if (r&2) A = -A; }
!    if (!B) { B = exp(Ranf()*logpmax); if (r&4) B = -B; }
!    if (!C) { C = Ranf()*pmax;         if (r&8) C = -C; }
     }
  
  



More information about the Comp.sources.x mailing list