47,437 questions
-1 votes
0 answers
48 views
Euler problem 1 Common Lisp recursive solution not working [closed]
I just started playing around with Common Lisp and tried the first euler problem which states to sum all the divisors of 3 OR 5 under some given parameter x. I would like to use a recursive solution ...
3 votes
2 answers
159 views
Recursive C function for creating number permutations
I do understand I have mistakes in this code #include <stdio.h> #include <stdlib.h> #include <string.h> int diziyi_yazdır(int dizi[], int dizi_uzunluğu) { for (int i ...
3 votes
1 answer
121 views
How to write an accumulative recursive function in J without looping
At the risk of asking a question with an obvious solution: if I have a function in J that takes two arguments and returns two arguments and I want to accumulate the answer's second argument and to use ...
1 vote
2 answers
153 views
How exactly does recursion work in x86 assembly?
My question is focused specifically on assembly (intel). In C for example, recursion can be done with a simple return command but in assembly I feel like there's a lot more things going on, especially ...
1 vote
2 answers
151 views
Given the string input, how can we traverse the binary tree recursively
Let's say our binary tree (bt) looks like this: Node* root = new Node(); root->left = new Node("B"); root->right = new Node(); root->right->right = new Node("A");...
2 votes
1 answer
106 views
Sequential compilation times of a jax-jitted recursive function
I have a recursively defined function my_func that is jitted using jax.jit from the jax library. It is defined below: # Imports import jax import jax.numpy as jnp from functools import partial import ...
0 votes
1 answer
41 views
Display tree depth using VLT recursion
I'm trying to render a tree structure using VLT, by indenting the rendering depending on the level it's on. I tried to use a recursive macro which passes on the $indentLevel variable (see code below). ...
0 votes
0 answers
157 views
Stop Condition for Self-Referential Marcos
Background I am on an ARM Cortex-A72. To access bit fields of my core's system registers I use a macro code generation mechanism. For the sake of simplicity, I replaced void operator=(const uint64_t v)...