POV-Ray : Newsgroups : povray.newusers : scientific notation : Re: scientific notation Server Time
3 Oct 2025 04:23:56 EDT (-0400)
  Re: scientific notation  
From: Bald Eagle
Date: 24 Sep 2025 12:00:00
Message: <web.68d414cdf4db7ec91398638025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> #local Exponent = int(floor(log(abs(Num))));

int(floor()) is redundant.
just use floor ()

floor(A)
Floor of A. Returns the largest integer less than A. Rounds down to the next
lower integer.

https://wiki.povray.org/content/Reference:Numeric_Expressions

> BTW, this will also work:
> #local Exponent = int(log(#if(Num < 1 & Num > -1) .1* #else #end abs(Num)));

:O

- bw


Post a reply to this message

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