POV-Ray : Newsgroups : povray.off-topic : A silly little toy (~200 kb) : Re: A silly little toy (~200 kb) Server Time
10 Oct 2024 03:19:20 EDT (-0400)
  Re: A silly little toy (~200 kb)  
From: Orchid XP v8
Date: 16 Oct 2008 13:46:10
Message: <48f77de2$1@news.povray.org>
Nicolas Alvarez wrote:

> Will it solve simple stuff like "x + 1 = 3" in version 1.5? :)
> 
> (or does it already...?)

Actually... if you encode "numbers" as lists of 1s of the appropriate 
length, then the @Join[] function essentially implements addition and 
subtraction! o_O

@Join[{1, 1}, {1, 1}, z]
z <- {1, 1, 1, 1}

@Join[{1, 1, 1}, y, {1, 1, 1, 1, 1}]
y <- {1, 1}

etc.

Obviously this isn't an especially intuitive or efficient way to work, 
but hey - Peano integers FTW! :-D

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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