home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,232 of 131,241   
   BGB to MitchAlsup   
   Re: Tonights Tradeoff (1/2)   
   10 Nov 25 03:40:26   
   
   From: cr88192@gmail.com   
      
   On 11/9/2025 8:12 PM, MitchAlsup wrote:   
   >   
   > BGB  posted:   
   >   
   >> On 11/8/2025 5:28 AM, Thomas Koenig wrote:   
   >>> BGB  schrieb:   
   >>>   
   >>>> I don't know yet if my implementation of DPD is actually correct.   
   >>>   
   >>> The POWER ISA has a pretty good description, see the OpenPower   
   >>> foundation.   
   >>   
   >> Luckily, I have since figured it out and confirmed it.   
   >>   
   >>   
   >> Otherwise, fiddled with the division algorithm some more, and it is now   
   >> "slightly less awful", and converges a bit faster...   
   >>   
   >> Relatedly, also added Square-Root...   
   >>   
   >>   
   >>   
   >> My previous strategies for square-root didn't really work as effectively   
   >> in this case, so just sorta fiddled with stuff until I got something   
   >> that worked...   
   >>   
   >> Algorithm I came up with (to find sqrt(S)):   
   >>     Make an initial guess of the square root, calling it C;   
   >>       Make an initial guess for the reciprocal of C, calling it H;   
   >>     Take a few passes (threading the needle, *1):   
   >>       C[n+1]=C+(S-(C*c))*(H*0.375)   
   >>     Redo approximate reciprocal of C, as H (*2);   
   >>       Refine H: H=H*(2-C*H)   
   >>     Enter main iteration pass:   
   >>       C[+1]=C+(S-(C*c))*(H*0.5)   
   >>       H[+1]=H*(2-C*H)  //(*3)   
   >>   
   >>   
   >> *1: Usual "try to keep stuff from flying off into space" step, using a   
   >> scale of 0.375 to undershoot convergence and increase stability (lower   
   >> means more stability but slower convergence; closer to 0.5 means faster,   
   >> but more likely to "fly off into space" depending on the accuracy of the   
   >> initial guesses).   
   >>   
   >> *2: Seemed better to start over from a slightly better guess of C, than   
   >> to directly iterate from the initial (much less accurate) guess.   
   >>   
   >> *3: Noting that if H is also converged, the convergence rate for C is   
   >> significantly improved (the gains from faster C convergence are enough   
   >> to offset the added cost of also converging H).   
   >>   
   >> Seems to be effective, though still slower than divide (which is still   
   >> 23x slower than an ADD or MUL).   
   >   
   > SQRT should be 20%-30% slower than DIV.   
   >   
      
   It is currently around 2.5x slower.   
      
      
   Though, the number of loop iterations isn't that much different; rather   
   the complexity of the loop is higher (as it is iterating both the square   
   root and the reciprocal of the square-root).   
      
      
   Compared to the version I put on pastebin, there has been around an 8x   
   improvement to the speed of performing the divide operation.   
      
      
   And, sqrt is around 3x faster than DIV in the pastebin version...   
      
      
   So, at the moment:   
      MUL: 19 MHz   
      ADD: 13 MHz   
      DIV: 0.83 MHz   
      SQRT: 0.34 MHz   
      
      
   >>   
   >> In this case, the more complex algorithm being (ironically) partly   
   >> justified by the comparably higher relative cost per operation (and the   
   >> issue that I can't resort to tricks like handling the floating-point   
   >> values as integers; doesn't work so hot with Decimal128).   
   >   
   > If you have binary SQRT and a quick way from DFP128 to BFP32, take SQRT   
   > in binary, convert back and do 2 iterations. Should be faster. {{I need   
   > to remind some folks that {float; float; FDIV; fix} was faster than   
   > IDIV on many 2st generation RISC machines.   
   >   
      
   Yeah, this is a possible option.   
      
   hardware FPU could give much better starting values for starting iteration.   
      
   Depends mostly on having reasonably fast and accurate format conversion.   
      
      
      
   >> Felt curious, tried asking Grok about this, it identified this approach   
   >> as the Goldschmidt Algorithm, OK. If so, kinda weird that I arrived at a   
   >> well known (?) algorithm mostly by fiddling with it.   
   >   
   > Feels like it is 1965--does it not ?!?   
   >   
      
   I don't know there.   
      
   Back then, my parents would have still been children...   
      
   All I really know about this era is stuff I have seen in TV shows.   
      
      
      
   Though, ironically, did before go and watch through some of the Kroft   
   brothers shows ("H.R Pufnstuf" and "Lidsville" and similar), which were   
   around when my parents were young. Kinda surreal...   
      
      
   Though, it seemed like both shows were sort of trying to do a thing of   
   creating a fantastical world on as little budget as possible. Seemed   
   like Pufnstuf was more ambitious, but with much cheaper SFX. Lidsville   
   was a little more conservative here, but generally did a better job in   
   terms of quality of both effects and costumes.   
      
   Pufnstuf had used a lot of fabric and stuffing for costumes (sorta like   
   pillows), and when puppets were used, were often crudely constructed and   
   controlled. There were a few cases where they used rigid sticks (though   
   this was more a Henson thing), but more often it was pulling on flexible   
   strings.   
      
   Some small puppets used foam rubber, but it appears to have been used   
   sparingly.   
      
      
   Scenery was often indoor sets with painted backgrounds, colored tarps of   
   the floors (sometimes with some sort of sand-like material on the   
   tarps), and flat cut outs for plants (usually hand-painted).   
      
   Contrast, Lidsville was less ambitious with its use of special effects,   
   but when used, were typically better done. A lot of the costumes   
   appeared better made as well.   
      
      
   But, I guess, one can compare/contrast with other types of shows, say:   
      Toho: Godzilla movies:   
        Foam rubber suits and what look like a lot model train-set parts;   
        Likely a lot more expensive;   
      Toei: Super Sentai / Power Rangers   
        Heavy use of foam rubber for costumes;   
        Spandex of vinyl for protagonist suits;   
        Frequent use of styrofoam for destructible objects;   
          Something gets smashed/broken/exploded, often styrofoam;   
        City scenes often used modified cardboard boxes;   
          Or, actors super-imposed onto scenes made using miniatures;   
        CGI sometimes used, but sparingly.   
          And, then, mostly compositing type effects.   
          The 90s show more liked using things like pyrotechnics.   
            Some of the later shows used CGI for things like explosions.   
        ...   
      
   Though, did see a recent movie "Psycho Goreman" which seemed to be   
   approaching special effects in a very similar way to Power Rangers (a   
   lot of foam rubber and occasional "obviously bad" CGI). I suspect they   
   may have been intentionally going for a Power Ranger's kinda look though.   
      
   Contrast, likely the effects in Godzilla would have been more expensive   
   than those in Power Rangers.   
      
   But, they were still kind of a hold out for using a lot of practical   
   effects; in an era where people were (elsewhere) rapidly jumping over to   
   the use of CGI. As did most newer Godzilla movies (like, CGI isn't quite   
   the same as rubber suits and puppets).   
      
   Feels sometimes like something was lost here.   
      
      
      
   A few times, seems like it would be funny though if a person did a show,   
   but instead deliberately used Pufnstuf style effects.   
      
      
   [continued in next message]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca