POV-Ray : Newsgroups : povray.newusers : scientific notation : Re: scientific notation Server Time
3 Oct 2025 04:10:56 EDT (-0400)
  Re: scientific notation  
From: Bald Eagle
Date: 23 Sep 2025 06:40:00
Message: <web.68d278dbf4db7ec91f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Here's my attempt, using string commands-- which are a bit tricky to implement;

I haven't read your code - have an unexpectedly busy morning here....

But why don't you just write a macro that takes your number as an argument, and
determines if its (abs val) is over 10 or under 1.

Then you can just run a loop by multiplying/dividing by 10 until you're in that
range, and then your exponent is the (signed) loop value.

Might be easier.
I recall I did something like this to buffer the str() output for a #debug
stream with spaces to make everything line up nicely.  No idea what scene code
that was in.

- BW


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.