A few comments about your code:
(1) The variables sin and polarform should be quoted--it's unlikely that this would make any difference, but it's good practice.
(2) There is no speed advantage to translating solvet, but it might be useful to know that Maxima translator doesn't handle %%; for example
(%i2) translate(solvet);
warning: encountered undefined variable %% in translation.
warning: encountered undefined variable sin in translation.
warning: encountered undefined variable polarform in translation.
(%o2) [solvet]
(%i3) solvet(x^3-3*x+1=0,x);
sort: first argument must be a list; found: %%
And maybe it's just me, but I think using %% makes code more difficult to modify.
(3) As an alternative to makelist, you might experiment with something like
map(lambda([s], lhs(s) = map('polarform, rhs(s))), spr)),
Doing so, you might be able to avoid the bug
(%i2) spr[1] : 29$
(%i3) solvet(x^3-3*x+1=0,x);
(%o3) [x=0,x=0,x=0]
Alternatively, another way to fix this bug would be insert local(spr) as the first line in your code.
Other comments:
(a) It seems that polarform needs to be mapped onto each solution--I would not have guessed that :(
(b) I like the idiom of mapping a lambda form onto a list--once you get used to it, I think you'll find it handy too.
As far as I know, makelist works just fine. But the way makelist explicitly calls ev is just kind of creepy.
--Barton
________________________________
(%i1)
solvet(eq,x):=block([spr,k,maperror,mapprint],
/* Copyright (C) 2013 Aleksas Domarkas */
maperror:false, mapprint:false,
spr:solve(eq,x), rectform(%%),
if freeof(sin,%%) then return(sort(%%)) else
makelist(x=map(polarform,rhs(spr[k])),k,1,length(spr)),
rectform(%%),
trigsimp(%%),
sort(%%))$